linux同步时间问题

我们在搭建集群和应用的时候,常因为时间不同步而启动不了。
下面就是我总结的一些时间同步问题的解决方法:

date -s "2015-07-21 09:32:00"

ntpdate命令:
ntpdate -u 210.72.145.44 :网络时间同步命令
注意:若不加上-u参数, 会出现以下提示:no server suitable for synchronization found
-u:从man ntpdate中可以看出-u参数可以越过防火墙与主机同步;
210.72.145.44:中国国家授时中心的官方服务器。
ntp常用服务器:
中国国家授时中心:210.72.145.44
NTP服务器(上海) :ntp.api.bz
美国:time.nist.gov 
复旦:ntp.fudan.edu.cn 
微软公司授时主机(美国) :time.windows.com 
台警大授时中心(台湾):asia.pool.ntp.org
经测试中国国家授时中心与NTP上海服务器可以正常同步时间,注意需要加上-u参数!

猜你喜欢

转载自blog.csdn.net/qq_18769269/article/details/80336299