操作系统使用的是Centos5.8 32位,如安装过程中出现错误,可以先看下后面的参考文章
1.默认的yum源中没有cobbler,需要安装一个yum仓库rpmforge,下载地址http://pkgs.repoforge.org/rpmforge-release/可以从这里找到相应的包
2.rpm -ivhrpmforge-release-0.5.3-1.el5.rf.i386.rpm
3.yum install dhcp tftp rsyncxinetd httpd
4./etc/init.d/iptables stop
5.vim /etc/selinux/config
SELINUX=disabled
6.reboot
7.yum install cobbler
8./etc/init.d/cobblerd start
9./etc/init.d/httpd start(如果报错,请参考下面的参考文章)
10.cobbler check
11.vim /etc/cobbler/settings
1)编辑/etc/cobbler/settings文件,找到 server选项,修改为适当的ip地址,本实例配置ip为:192.168.137.2
2)编辑/etc/cobbler/settings文件,找到 next_server选项,修改为适当的ip地址,本实例配置ip为:192.168.137.2
3)SELinux的设置。如果上面已经关闭了SELinux就不用管了
4)执行 cobbler get-loaders,系统将自动下载loader程序,完成提示4的修复工作。
5)编辑/etc/xinetd.d/rsync文件,将文件中的disable字段的配置由yes改为no
6)需要安装pykickstart
yum �Cy install pykickstart
7) 修改cobbler用户的默认密码,可以使用如下命令生成密码,并使用生成后的密码替换/etc/cobbler/settings中的密码。生成密码命令:
openssl passwd -1 -salt 'centos' 'centos' (其中-1 就是一字)
$1$centos$Uq6E6Wp5SDZYbs6MCmamP0
vi/etc/cobbler/setting
查找default_password_crypted:把原始密码替换掉
default_password_crypted: $1$centos$Uq6E6Wp5SDZYbs6MCmamP0
8) 安装CMAN
yum �Cy installcman
9) 重启cobbler
/etc/init.d/cobbler restart
12.配置dhcp
vim/etc/cobbler/settings manage_dhcp: 1
vim/etc/cobbler/dhcp.template
subnet 192.168.137.0 netmask255.255.255.0 {
option routers 192.168.137.1;
option domain-name-servers 8.8.8.8;
option subnet-mask 255.255.255.0;
range dynamic-bootp 192.168.137.100 192.168.137.254;
filename "/pxelinux.0";
default-lease-time 21600;
max-lease-time 43200;
next-server $next_server;
}
13.挂载光盘
mount /dev/cdrom/mnt
14.导入镜像
cobbler import --path=/mnt --name=centos5.8
15.cobbler sync
16.cobbler list
17.启动一台机器,从网络启动
18.完成
参考文章:
http://jikang87.blog.163.com/blog/static/102210630201292753813340/
http://cwtea.blog.51cto.com/4500217/1047410