1yum安装ntp服务
2配置ntp配置文件
7. ntp时间同步
#启动ntp服务
systemctl start ntpd.service && systemctl enable ntpd.servcie 如客户自定义时间同步,则使用ntptime检查状态是否ok
SERVER
restrict 172.23.5.134(本地ip) nomodify notrap nopeer noquery
restrict 172.23.5.0(网段ip) mask 255.255.255.0 nomodify notrap
server 127.127.1.0(server就写这个) iburst
CLIENT
restrict 172.23.5.135(本地ip) nomodify notrap nopeer noquery
restrict 172.23.5.0(网段ip) mask 255.255.255.0 nomodify notrap
server 172.23.5.134(写server地址) iburst
ntptime/ntpq -p测试 如涉及到服务器重启,需要检查时间同步



