1、安装需要软件
yum -y install dhcp httpd tftp-server syslinux cobbler
2、启动相应服务
systemctl start httpd coblerd tftp.socket
3、执行cobbler check检测,根据提示修改相关配置
cobbler check
4、配置修改完成后,重启服务,并执行同步
systemctl restart cobblerd
cobbler sync
5、配置dhcp,并启动服务
vi /etc/dhcp/dhcpd.conf
subnet 192.168.34.0 netmask 255.255.255.0 {
range 192.168.34.101 192.168.34.200;
filename "pxelinux.0";
next-server 192.168.34.7;
}
systemctl start dhcpd
6、通过导入安装光盘文件及kickstart文件来自动生成distro及profile
cobbler import --name=centos7 --path=/media/cdrom --kickstart=/var/lib/cobbler/kickstarts/centos7.cfg
7、测试自动安装操作系统。