Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost ~]# sed -ri ‘s/^(SELINUX=).*/\1disabled/g’ /etc/selinux/config
[root@localhost ~]# setenforce 0
[root@localhost ~]# reboot
//配置yum源
[root@localhost ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
[root@localhost ~]# sed -i -e ‘/mirrors.cloud.aliyuncs.com/d’ -e ‘/mirrors.aliyuncs.com/d’ /etc/yum.repos.d/CentOS-Base.repo
//配置epel源
[root@localhost ~]# yum -y install epel-release vim
//安装依赖包
[root@php ~]# dnf module enable cobbler
[root@php ~]# dnf -y install httpd dhcp-* tftp xinetd pykickstart cobbler cobbler-web rsync-daemon
//启动
[root@localhost ~]# systemctl enable --now httpd cobblerd
//修改server的ip地址为本机ip
[root@localhost ~]# sed -i ‘s/^server: 127.0.0.1/server: 192.168.129.135/’ /etc/cobbler/settings.yaml
//设置tftp的ip地址为本机ip
[root@localhost ~]# sed -i ‘s/^next_server: 127.0.0.1/next_server: 192.168.129.135/’ /etc/cobbler/settings.yaml
//下载缺失文件
[root@localhost ~]# cobbler get-loaders
task started: 2021-10-13_123854_get_loaders
task started (id=Download Bootloader Content, time=Wed Oct 13 12:38:54 2021)
running python triggers from /var/lib/cobbler/triggers/task/get_loaders/pre/*
running shell triggers from /var/lib/cobbler/triggers/task/get_loaders/pre/*
shell triggers finished successfully
downloading https://cobbler.github.io/loaders/README to /var/lib/cobbler/loaders/README
downloading https://cobbler.github.io/loaders/COPYING.yaboot to /var/lib/cobbler/loaders/COPYING.yaboot
downloading https://cobbler.github.io/loaders/COPYING.syslinux to /var/lib/cobbler/loaders/COPYING.syslinux
downloading https://cobbler.github.io/loaders/yaboot-1.3.17 to /var/lib/cobbler/loaders/yaboot
downloading https://cobbler.github.io/loaders/pxelinux.0-3.86 to /var/lib/cobbler/loaders/pxelinux.0
downloading https://cobbler.github.io/loaders/menu.c32-3.86 to /var/lib/cobbler/loaders/menu.c32
downloading https://cobbler.github.io/loaders/grub-0.97-x86.efi to /var/lib/cobbler/loaders/grub-x86.efi
downloading https://cobbler.github.io/loaders/grub-0.97-x86_64.efi to /var/lib/cobbler/loaders/grub-x86_64.efi
*** TASK COMPLETE ***
注意:此处显示 TASK COMPLETE 则表示没有问题
//启动rsync并设置开机自启
[root@localhost ~]# systemctl enable --now rsyncd
Created symlink /etc/systemd/system/multi-user.target.wants/rsyncd.service → /usr/lib/systemd/system/rsyncd.service.
//生成加密的密码
[root@localhost ~]# openssl passwd -1
Password:
Verifying - Password:
1 1