[root@mariadb-server ~]# yum install chrony -y 光盘源
[root@mariadb-server ~]# systemctl start chronyd
[root@mariadb-server ~]# systemctl enable chronyd
[root@mariadb-server ~]# vim /etc/chrony.conf
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server ntp.aliyun.com iburst #此处为增加的aliyun 服务器
[root@mariadb-server ~]# systemctl restart chronyd
[root@mariadb-server ~]# chronyc sources -v 查看验证成功
210 Number of sources = 1
.-- Source mode ‘^‘ = server, ‘=‘ = peer, ‘#‘ = local clock.
/ .- Source state ‘*‘ = current synced, ‘+‘ = combined , ‘-‘ = not combined,
| / ‘?‘ = unreachable, ‘x‘ = time may be in error, ‘~‘ = time too variable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 203.107.6.88 2 6 17 5 +1443us[+3286us] +/- 36ms
注意:不要在办公网,内网等网路测试,最好在虚拟机 新建一个仅主机模式,且关闭vmware 自带的dhcp服务。
yum install cobbler dhcp -y
cd /etc/cobbler/
cp -p dhcp.template dhcp.template.bak
[root@pxe-cobbler ~]# openssl passwd -1 -salt ‘lcg‘ ‘redhat‘
$1$lcg$Kn6A1VgsDX3JEye.7W2PN0
#cobbler 配置文件修改
[root@pxe-cobbler ~]# vim /etc/cobbler/settings
server: 172.16.16.70
next_server: 172.16.16.70
default_password_crypted: "$1$lcg$Kn6A1VgsDX3JEye.7W2PN0" ( #此处为密码 )
manage_dhcp: 1 ( 默认为0 ,需要改为1 ,同时注意dhcp 配置文件是否正确)
systemctl start cobblerd httpd tftp
#dhcp 配置文件
[root@pxe-cobbler ~]# vim /etc/cobbler/dhcp.template
subnet 172.16.16.0 netmask 255.255.255.0 {
option routers 172.16.16.2;
option domain-name-servers 172.16.16.2;
option subnet-mask 255.255.255.0;
range dynamic-bootp 172.16.16.100 172.16.16.254;
default-lease-time 21600;
max-lease-time 43200;
next-server $next_server;
root@pxe-cobbler ~]# systemctl restart dhcpd
#下载相关文件
[root@pxe-cobbler ~]# cobbler get-loaders
#文件同步
[root@pxe-cobbler ~]# cobbler sync
#添加两个光盘,并连接安装光盘,创建目录,且挂载光盘
centos6.10 centos7.6
mkdir /centos6
mkdir /centos7
mount /dev/sr0 /centos6
mount /dev/sr1 /centos7
# 导入安装源,制作引导菜单
cobbler import --path=/centos6 --name=Centos6.10-x86_64 --arch=x86_64
cobbler import --path=/centos7 --name=Centos7.6-x86_64 --arch=x86_64
#客户机测试,成功
## 如要管理自己的ks 应答文件
cobbler profile add --name Centos6.5-min --distro=Centos6.5-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ks6.cfg
cobbler profile add --name Centos7.6-min --distro=Centos7.6-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ks7_mini.cfg
#ks 应答文件制作
[root@pxe-cobbler ~]# yum install system-config-kickstart -y
[root@centos6 ~]#system-config-kickstart
图形界面 自动打开保存就是 ks文件了
原文:https://blog.51cto.com/8683332/2557352