在用ntpdate同步时间时,提示以下错误,个人服务器在机房托管,极可能机房将NTP流量屏蔽。
[root@localhost htpdate]# ntpdate ntp.neu6.edu.cn
3 Apr 20:13:31 ntpdate[19954]: no server suitable for synchronization foundgit
解决办法,使用htpdate进行定时同步
安装:
git clone https://github.com/iridium77/htpdategithub
make&&make install服务器
htpdate -t -s ntp.neu.edu.cn
-t:关闭时间检查,默认状况下,时间偏移量大于一年,本地时间没法修改,使用-t设置,任什么时候间戳都将被接受。
-s:当即设置时间。ide
缺点:时间偏差可能在0.5s以内ui