ntp服务对时
1.修改配置文件
vim /etc/ntp.conf
server 192.168.3.100 iburst # server后面添加对时主机Ip
restrict 192.168.3.0 mask 255.255.255.0 # restrict后面添加需要和本机对时IP
2.重启ntp服务,使对时服务生效
/etc/init.d/ntp restart
3.192.168.3.100 设置本地对时
server 127.127.1.0 iburst 其余server使用#注释掉
4.查看对时是否生效 对时服务器 ip 前有 * 即对时成功。
ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================================================================
*192.168.3.100 10.240.241.5 4 u 53 64 377 0.240 0.374 0.240
注:ntp首次对时大概需要5分钟左右。