ntp时钟同步
yum install -y ntp
systemctl enable ntpd(设置开机自启)
server
(vi /etc/ntp.conf)
Hosts on local network are less restricted.
restrict 10.19.0.0 mask 255.255.0.0 nomodify notrap # 允许内网其他机器同步时间
Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org iburst #注释掉原时钟服务器()
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
client
(vi /etc/ntp.conf)注释原时钟服务器,增加2行
#Hosts on local network are less restricted
restrict 10.19.36.7 nomodify notrap noquery
server 10.19.36.7 #ntp server inner net
#server 1.centos.pool.ntp.org
#server 2.centos.pool.ntp.org
systemctl restart ntpd
systemctl status ntpd
ntpstat