安装epel###
rpm -ivh https://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm
安装软件包###
yum install -y httpd tftp dhcp cobbler cobbler-web pykickstart xinetd
启动服务###
systemctl start httpd
systemctl start cobblerd
systemctl start xinetd
设置开机启动###
systemctl enable httpd
systemctl enable cobblerd
systemctl enable xinetd
查看cobbler安装配置说明###
cobbler check 并根据说明来修改相关配置,如无特殊需求,电源管理可以安装
重启cobbler服务 再次cobbler check 查看是否还有需要配置的###
systemctl restart cobblerd
cobbler check
设置让cobbler管理DHCP###
1、进入settings配置文件中进行设置,搜索DHCP,把 manage_dhcp: 0 中的0替换成1
vim /etc/cobbler/settings
2、修改cobbler中DHCP模板文件
vim /etc/cobbler/dhcp.template
subnet 10.0.0.0 netmask 255.255.255.0 #网段
22 ┊option routers 10.0.0.2;#网关
23 ┊option domain-name-servers 10.0.0.2; #DNS
24 ┊option subnet-mask 255.255.255.0; #子网掩码
25 ┊range dynamic-bootp10.0.0.160 10.0.0.170; #分配的地址段
26 ┊default-lease-time 21600;
27 ┊max-lease-time 43200;
28 ┊next-server$next_server;
3、重启cobbler###
systemctl restart cobblerd