一、测试环境说明
1、系统:rhel6.9
2、ip地址:20.20.20.24
二、环境准备
1、关闭iptables防火墙、selinux
2、设置hosts域名解析(可选)
三、安装软件
# yum install cobbler httpd tftp-server dhcp
四、挂载
略
五、修改配置文件
# vim /etc/httpd/conf/httpd.conf
ServerName 20.20.20.22:80
# openssl passwd -1
Password:
Verifying - Password:
$1$BFaLgUBZ$9HX7WbrCz7fPEBkdk9FYV/
# vim /etc/cobbler/settings
manage_dhcp: 1
manage_rsync: 1
next_server: 20.20.20.24
server: 20.20.20.24
default_password_crypted: "$1$BFaLgUBZ$9HX7WbrCz7fPEBkdk9FYV/"
# vim /etc/cobbler/dhcp.template
subnet 20.20.20.0 netmask 255.255.255.0 {
option routers 20.20.20.2;
option subnet-mask 255.255.255.0;
range dynamic-bootp 20.20.20.121 20.20.20.130;
default-lease-time 21600;
max-lease-time 43200;
next-server $next_server;
六、启动相关服务
httpd
dhcpd
cobblerd
# cobbler check
# cobbler get-loaders
# cobbler sync
七、导入安装源
# cobbler import --name=rhel6.9 --path=../rhel6.9
八、创建ks文件
九、关联ks文件
# cobbler profile edit --name=rhel6.9 --distro=rhel6.9 --kickstart=../rhel6.9.ks