CentOS7
#yum list
#yum install cobbler cobbler-web dhcp tftp-server pykickstart httpd rsync xinetd –y
#vim /etc/cobbler/settings
next_server: 192.168.111.130 //指定PXE位置
server:192.168.111.130
manage_dhcp:1 //管理DHCP启动
#systemctl start httpd.service //开启httpd服务
#systemctl start cobblerd.service //开启cobbler服务
#systemctl stop firewalld.service //关闭防火墙
#setenforce 0 //关闭增强安全功能
++其中第1,5,7条不影响Cobbler自动装机可暂不处理++
#vim /etc/xinetd.d/tftp
disable = no //将disable修改配置为no
- 第3条:
#cobbler get-loaders //下载引导操作系统文件
#systemctl enable rsyncd.service //开启rsyncd服务
#openssl passwd -1 -salt ‘abc123‘ ‘abc123‘ //盐值加密
#vim /etc/cobbler/dhcp.template //cobbler控制的dhcp服务模板
subnet 192.168.111.0 netmask 255.255.255.0 {
option routers 192.168.111.1; //修改网关
option domain-name-servers 192.168.111.2; //修改DNS
option subnet-mask 255.255.255.0;
range dynamic-bootp 192.168.111.100 192.168.111.200; //修改地址池 #cobbler sync //同步生成DHCP配置文件
#cobbler import --path=/mnt --name=CentOS-7-x86_64 --arch=x86_64 //导入镜像文件,默认导入存放位置为/var/www/cobbler/ks_mirror/CentOS-7-x86_64
#tree /var/lib/tftpboot/images
/var/lib/tftpboot/images
└── CentOS-7-x86_64
├── initrd.img //引导文件
└── vmlinuz //压缩内核
原文地址:http://blog.51cto.com/13625810/2117517