rhel6上的cobbler部署

本文详细介绍如何在Red Hat Enterprise Linux 6上使用Cobbler进行自动化部署。内容包括安装必要的软件包、配置Cobbler服务、同步配置、导入ISO镜像及调整DHCP和Kickstart配置等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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
genisoimage
客户端用到的软件包:
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









本文转自 sharkyan 51CTO博客,原文链接:http://blog.51cto.com/sharkyan/670554,如需转载请自行联系原作者
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值