rhel6上的cobbler部署

rhel6上的cobbler部署

看了別人的cobbler文章想試試,突發奇想在rhel6上做了一下。與rhel5相比還是小有區別的,寫出來大家看看。

默認的yum源裏找不到cobbler何其相關軟件,先安裝rpmforge這個第三方源。
在rhel6下rpmforge軟件少點,還得從網上單獨下載cobbler的rpm包。
rhel61上安裝的是2.0.11的版本。
 
服務端用到的軟件包如下:
rpmforge-release-0.5.2-2.el6.rf.i686.rpm
cobbler    (rpmforge提供)
python-cheetah    (rpmforge提供)
python-yaml    (rpmforge提供)
libyaml    (rpmforge提供)
dhcp
xinetd
tftp-server
createrepo
mod_wsgi
python-devel
deltarpm
python-deltarpm
genisop_w_picpath
客戶端用到的軟件包:
koan    (rpmforge提供)
 
 
1. 部署方法:
安裝上述軟件,不會裝的到這裏不用看了。
2. 檢查cobbler配置:
#service cobblerd start ; service httpd start    #需要先啓動這兩個服務才能檢查。
1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work.  This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.
2 : For PXE to be functional, the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network.
3 : some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely.  Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.
4 : change 'disable' to 'no' in /etc/xinetd.d/tftp
5 : change 'disable' to 'no' in /etc/xinetd.d/rsync
6 : debmirror package is not installed, it will be required to manage debian deployments and repositories
7 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
8 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
處理上述問題。這個和老版本有些許區別,有的功能我們是不需要的,不要糾結全部解決。
3. 導入:
#mount /dev/cdrom /media
#cobbler import --path=/media/ --name=rhel61 --arch=i386
4. 修改DHCP和kickstart配置模板:
#vi /var/lib/cobbler/kickstarts/default.ks
#cat /etc/cobbler/dhcp.template > /etc/dhcp/dhcpd.conf
注意nextserver和filename;本服務器的IP地址要和dhcp配置的subnet一個網段,否則會啓動失敗。
5. 同步配置:
#cobbler sync
6. 啓動有關服務:
#service xinetd start
#service dhcpd start
#service httpd restart
#service cobblerd restart
設置相關服務開機啓動
7. 安裝服務器:
遇到找不到ks文件的問題,起初不知道cobbler那個地方配置ks文件。發現用下面的命令後找到了cobbler不能讀取ks文件的用#註釋的地方。
#cobbler profile getks --name=rhel61-i386
需要在ks文件裏面寫明安裝路徑。
url --url=http://192.168.10.203/
#cobbler profile edit --name rhel61-i386 --kickstart=/var/lib/cobbler/kickstarts/default.ks 
處理後記得用#cobbler sync再次同步配置。
8.重裝系統:客戶端安裝koan。
#koan --server=192.168.10.203 --list=profiles
#koan --server=192.168.10.203 --replace-self --profile=rhel61-i386
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章