就是用NTP了,通过外部的服务同步时间.
ntpdate us.pool.ntp.org | logger -t NTP

如果没有ntpdate ,可以使用 yum install ntpdate 进行安装。


当然最好放在crontab里面,各一段时间同步一次就OK.
crontab -e
* * * * * /usr/sbin/ntpdate us.pool.ntp.org | logger -t NTP
每分钟同步一次,够狠吧.


===============================
NTP协议全称网络时间协议(Network Time Procotol)。它的目的是在国际互联网上传递统一、标准的时间。具体的实现方案是在网络上指定若干时钟源网站,为用户提供授时服务,并且这些网站间应该能够相互比对,提高准确度。

修改后查看当前时间方法:

[root@localhost ~]# date
2014年 12月 03日 星期三 21:39:21 CST
[root@localhost ~]#

相关文章:

  • 2021-11-17
  • 2022-03-01
  • 2021-10-23
  • 2021-09-14
  • 2021-10-18
  • 2021-09-26
猜你喜欢
  • 2022-12-23
  • 2022-01-02
  • 2021-12-21
  • 2022-12-23
  • 2021-08-21
  • 2021-06-26
  • 2021-07-15
相关资源
相似解决方案