server:
#安装chrony
yum install chrony -y
#在其中一台主机配置为时间服务器
cat /etc/chrony.conf
server time2.aliyun.com iburst #从哪同步时间
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
allow 192.168.0.0/16 #允许的ntp客户端网段
local stratum 10
logdir /var/log/chrony
#重启服务
systemctl restart chronyd
client:
cat /etc/chrony.conf
server 192.168.10.254 iburst
#重启验证
systemctl restart chronyd
chronyc sources -v
阅读(325) | 评论(0) | 转发(0) |