centos7
yum install epel-* -y
yum -y install httpd dhcp tftp python-c* cobbler xinetd cobbler-web
systemctl enable httpd
systemctl enable cobblerd
systemctl start httpd
systemctl start cobblerd
运行检测
cobbler check
下载启动文件
cobbler get-loaders
启用并启动rsyncd
systemctl enable rsyncd
systemctl start rsyncd
安装pykickstart
yum install pykickstart -y
生成root默认密码
openssl passwd -1 -salt '123' '123'
$1$bjfh$FnywzAEV.cpqS2tpA3GLi0
vi /etc/cobbler/settings
...
101 default_password_crypted: "$1$bjfh$FnywzAEV.cpqS2tpA3GLi0"
242 manage_dhcp: 1
272 next_server: 192.168.2.3
384 server: 192.168.2.3
vi /etc/xinetd.d/tftp
...
14 disable = no
systemctl restart cobblerd
cobbler check
配置dhcp
manage_dhcp: 1
vi /etc/cobbler/dhcp.template
...
21 subnet 192.168.2.0 netmask 255.255.255.0 {
22 option routers 192.168.2.2;
23 option domain-name-servers 192.168.2.198;
24 option subnet-mask 255.255.255.0;
25 range dynamic-bootp 192.168.2.240 192.168.2.254;
26 default-lease-time 21600;
27 max-lease-time 43200;
28 next-server $next_server;
systemctl restart cobblerd
cobbler sync
排除错误,直到通过
修改默认界面
cat /var/lib/tftpboot/pxelinux.cfg/default
导入镜像
cd /opt
mount -o loop CentOS-7-x86_64-Minimal-1810.iso /mnt
cobbler import --path=/mnt --name=Centos-7.6-x86_64 --arch=x86_64
umount /mnt
mount -o loop CentOS-6.10-x86_64-minimal.iso /mnt
cobbler import --path=/mnt --name=Centos-6.10-x86_64 --arch=x86_64
cobbler list
cobbler report