sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config
setenforce 0
systemctl stop firewalld.service
systemctl disable firewalld.service
yum -y install http://mirrors.163.com/centos/7/extras/x86_64/Packages/epel-release-7-9.noarch.rpm
yum install cobbler cobbler-web dhcp tftp-server pykickstart httpd xinetd -y
systemctl start httpd
systemctl enable httpd
systemctl start cobblerd
systemctl enable cobblerd
systemctl start xinetd.service
systemctl enable xinetd.service
cobbler check
sed -ri '/allow_dynamic_settings:/callow_dynamic_settings: 1' /etc/cobbler/settings
systemctl restart cobblerd
cobbler setting edit --name=server --value=192.168.1.30
cobbler setting edit --name=next_server --value=192.168.1.30
sed -ri '/disable/cdisable = no' /etc/xinetd.d/tftp
systemctl enable xinetd
systemctl restart xinetd
cobbler get-loaders
systemctl start rsyncd
systemctl enable rsyncd
yum install pykickstart -y
[root@localhost ~]# openssl passwd -1 -salt `openssl rand -hex 4` 'redhat'
$1$ebeb198a$psvA.N7JrPpsGTs33OI2Q0
[root@localhost ~]# cobbler setting edit --name=default_password_crypted --value='$1$ebeb198a$psvA.N7JrPpsGTs33OI2Q0
yum install fence-agents -y
#cobbler setting edit --name=manage_dhcp --value=1
#vi /etc/cobbler/dhcp.template
subnet 192.168.1.0 netmask 255.255.255.0 { #子网
option routers 192.168.1.1; #网关
option domain-name-servers 114.114.114.114; #dns
option subnet-mask 255.255.255.0; #子网掩码
range dynamic-bootp 192.168.1.100 192.168.1.254; #dhcp池
default-lease-time 21600;
max-lease-time 43200;
next-server $next_server;
systemctl restart cobblerd
cobbler sync
ss -anltup | egrep ':80|:67|:69'
- 正常启动页面