可参考:http://www.ntp.org.cn/

http://www.cnblogs.com/pipelone/archive/2009/06/17/1505002.html

当前已提供的各国NTP服务器列表

区域[zone] 域名[Domain] IP池[IP Pool]
中国[China] cn.ntp.org.cn [202.108.6.95] [202.112.29.82] [110.75.190.198] [115.28.122.198] [182.92.12.11] 
[120.25.108.11] [110.75.186.249] [110.75.186.248] [110.75.186.247]
中国台湾[ChinaTaiwan] tw.ntp.org.cn [120.119.28.1]
美国[America] us.ntp.org.cn [24.56.178.140] [131.107.13.100]
新加坡[Singapore] sgp.ntp.org.cn [139.162.20.174] [103.11.143.248]
韩国[korea] kr.ntp.org.cn [218.234.23.44] [211.233.40.78]
德国[Germany] de.ntp.org.cn [131.188.3.220] [131.188.3.223]
日本[Japan] jp.ntp.org.cn [133.243.238.243] [157.7.152.213]

新装的服务器可能设置了错误的,需要调整时区并调整时间.如下是使用NTP来从一个时间服务器同步

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

ntpdate cn.ntp.org.cn

第一句是把当前时区调整为上海就是+8区,想改其他时区也可以去看看/usr/share/zoneinfo目录;

然后第二句是利用ntpdate同步标准时间.

没有安装ntpdate的可以yum一下:

yum install -y ntpdate

加入定时计划任务,每隔10分钟同步一下时钟

crontab -e

0-59/10 * * * * /usr/sbin/ntpdate cn.ntp.org.cn | logger -t NTP

其他网络时间服务器地址如下:(也可以自己去搜索下)

time.nist.gov (美国) 
ntp.fudan.edu.cn (复旦) )(国内用户推荐使用此服务器)

还有推荐210.72.145.44 这个是国家授时中心的IP....ping这个已经不通了....不能使用.

Linux(CentOS)同步时间的更多相关文章

  1. CentOS同步时间

    用date查看系统当前时间,date -R 可查看时区. CentOS 同步时间由ntp服务提供,可以用"yum install ntp -y"安装. 装完后运行命令 ntpdat ...

  2. CentOS 同步时间

    来源:http://www.ctusky.com/16/0497/ 用date查看系统当前时间,date -R 可查看时区. CentOS 同步时间由ntp服务提供,可以用"yum inst ...

  3. Linux离线同步时间

    Linux离线同步时间 思路:以其中一台时间为准 脚本 #!/bin/shcurrent=`date '+%H:%M:%S'` for i in bigdata1 bigdata2 bigdata3 ...

  4. Linux/CentOS 同步网络时间

    由于硬件的原因,机器或多或少的跟标准时间对不上,一个月的误差几秒到几分钟不等.对于服务器来说时间不准,会有很多麻烦.例如,支付的时候,无法下单,游戏无法登录等. 方法一:用 ntpdate从时间服务器 ...

  5. Linux自动同步时间的方法

    介绍两种同步linux系统的时间方法: (1) 开启ntpd服务,即配置ntp服务器实现时间同步. (2) 利用ntp客户端程序,即ntpdate同步时间. 注意:因为ntp服务器本来就会与上层时间服 ...

  6. Linux 局域网同步时间

    选择一台能上外网的机器作为时间服务器(都不能上亦可以,任选一台即可,但是只能保证局域网内时间同步) 配置此时间服务器 安装 ntp 在 /etc/ntp.conf 中配置 restrict 127.0 ...

  7. Linux服务器同步时间

    进行Linux服务器的时间同步是一件需要注意的事情,不然,集群中的服务器时间不同将导致许多奇怪问题发生, 如果没有安装crontab,那么,使用yum install crontabs进行安装和启动, ...

  8. Linux自动同步时间

    一.安装时间同步工具 yum -y install ntp 二.同步时间 1.修改时区 cp -y /usr/share/zoneinfo/Asia/Shanghai /etc/localtime v ...

  9. Linux系统(centos)同步时间方式

    .删除本地时间并设置时区为上海 rm -rf /etc/localtime ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 1 yum i ...

随机推荐

  1. How to bind to data when the DataContext is not inherited【项目】

    http://www.thomaslevesque.com/2011/03/21/wpf-how-to-bind-to-data-when-the-datacontext-is-not-inherit ...

  2. DeleteDC() 与 ReleaseDC() 的区别 [转]

    DeleteDC 该函数删除指定的设备上下文环境(DC). 原型: BOOL DeleteDC(HDC hdc): 参数: hdc:设备上下文环境的句柄. 返回值: 成功,返回非零值:失败,返回零.调 ...

  3. ?this&函数自身的引用

    <!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  4. text输入框中按下enter键时阻止刷新页面

    1.在js中加入一个方法: function judge_enter(){ if(window.event.keyCode==13){ return false;//阻止页面刷新的作用 } } 2.然 ...

  5. 全代码实现ios-3

    决定做ios开发的时候,看了很多本关于ios开发的书籍,其中有国内的人写的,也有根据外国的书翻译过来的. 很可惜,这些书里的例子没办法照搬过来,因为Xcode更新换代太快了,而这些书本的内容更新的速度 ...

  6. 切取图片的一部分(利用CCRenderTexture)

    转自:http://blog.csdn.net/wcjwdq/article/details/37932769 显示图片时,在项目中经常会用只读取图片的一部分,而不是全部. 错误方式:很多人这时候会采 ...

  7. MySQL中你肯定不知道的int隐情

    MySQL中定义id字段为int类型,但是你知道它内部是什么玩意吗? 1.如果定义int类型,但是不声明长度,系统默认为11个长度(这个大家都知道): 2.如果指定长度小于11,实际上系统还是默认为1 ...

  8. Codeforces 427 D. Match &amp; Catch

    后缀数组.... 在两个串中唯一出现的最小公共子串 D. Match & Catch time limit per test 1 second memory limit per test 51 ...

  9. Codeforces Round #335 (Div. 1) C. Freelancer's Dreams 计算几何

    C. Freelancer's Dreams Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://www.codeforces.com/contes ...

  10. Codeforces Round #310 (Div. 2) A. Case of the Zeros and Ones 水题

    A. Case of the Zeros and Ones Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/con ...