Cobbler

1、安装cobbler
64位 rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
32位 rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

yum install yum-utils createrepo dhcp tftp-server httpd xinetd rsync cobbler cobbler-web cman

2、配置cobbler
cobbler check

根据提示更改
vi /etc/cobbler/settings
server: 192.168.0.2 #设置cobbler server的IP地址
next-server: 192.168.0.2 #设置PXE server的IP地址
manage_dhcp: 1 #开启管理DHCP服务

启动tftp和rsync
vi /etc/xinetd.d/tftp
将disable = yes改为:disable = no
vi /etc/xinetd.d/rsync
将disable = yes改为:disable = no

3. 导入DVD ISO 中的文件:

mount -o loop Centos-5.8-x86_64-DVD.iso /mnt/dvd/ # 将ISO文件挂载到 /mnt/dvd 目录
cobbler import –path=/mnt/dvd –name=Centos5.8-x86-64 # 从 /mnt/dvd 目录导入所有安装文件,命名为 Centos5.8-x86-64
cobbler distro list # 查看导入结果,应显示 Centos5.8-64-i386 和 Centos5.8-64-xen-i386

4. 修改 DHCP 和 Kickstart 配置模板:

vi /etc/cobbler/dhcp.template # DHCP 配置模板,如果已经有一个 dhcpd.conf,可参照修改此模板
vi /etc/cobbler/sample.ks # Kickstart 配置模板

5. 生成并同步所有配置:

cobbler sync

6. 启动相关服务:

service xinetd start #
service dhcpd start
service cobblerd start

你可能感兴趣的:(运维)