使用ntp同步linux系统时间

使用ntp同步linux系统时间


首先安装ntp包,有yum就使用yum install ntp


安装之后系统多了一些关于ntp的命令,如果有兴趣可以研究下


最后定时校正服务器时钟,定时与中国国家授时中心授时服务器同步
在crontab -e里加入一行:
*/30 * * * * ntpdate 210.72.145.44


但是要记得不要启动ntpd服务, 不然时间会因为有ntp socket被使用而无法同步时间


会报类似的错误”25 Feb 17:17:19 ntpdate[22397]: the NTP socket is in use, exiting”

2007年11月3日 | 归档于 Linux教程
标签:
本文目前尚无任何评论.

发表评论

XHTML: 您可以使用这些标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>