Linux时间同步ntpdate

Linux服务器要求时间准确,但是Linux本身没有网络时间同步功能,我们需要借助ntpdate功能来实现时间精准.

 

安装ntpdate

yum -y install ntpdate

 

国内常用ntp服务器列表

#ntp.sjtu.edu.cn 202.120.2.101 (上海交通大学网络中心NTP服务器地址)
#s1a.time.edu.cn 北京邮电大学
#s1b.time.edu.cn 清华大学
#s1c.time.edu.cn 北京大学
#s1d.time.edu.cn 东南大学
#s1e.time.edu.cn 清华大学
#s2a.time.edu.cn 清华大学
#s2b.time.edu.cn 清华大学
#s2c.time.edu.cn 北京邮电大学
#s2d.time.edu.cn 西南地区网络中心
#s2e.time.edu.cn 西北地区网络中心
#s2f.time.edu.cn 东北地区网络中心
#s2g.time.edu.cn 华东南地区网络中心
#s2h.time.edu.cn 四川大学网络管理中心
#s2j.time.edu.cn 大连理工大学网络中心
#s2k.time.edu.cn CERNET桂林主节点
#s2m.time.edu.cn 北京大学
 
同步命令如下(上海交通大学)

ntpdate ntp.sjtu.edu.cn

也可以这个命令计划任务里设置下
crontab -e
00 11 * * * root ntpdate ntp.sjtu.edu.cn
 
每天11点同步
posted @ 2014-08-01 12:56  _Chill  阅读(636)  评论(0编辑  收藏  举报