配置要求:
chrony服务部署:两台机器
a: 第一台机器从阿里云同步时间
第二台机器从第一台机器同步时间
b: 第一台服务器使用系统时间作为第二台服务器的时钟源, 第一台服务器层级设置为6
a:安装chrony,关闭防火墙与selinux
<code class="language-plaintext hljs">
yum -y install chrony
systemctl stop firewalld.service
setenforce 0
</code>
配置
<code class="language-plaintext hljs">
vim /etc/chrony.conf
#将原有的pool注释掉,并添加阿里云的时间服务器
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server ntp.aliyun.com iburst
#允许其它客户端连接到此台时钟服务器
allow all
</code>
启动并验证是否配置正确
<code class="language-plaintext hljs">
systemctl st