【Linux】- 同步网络时间
转自:Linux同步网络时间
Linux服务器运行久时,系统时间就会存在一定的误差,一般情况下可以使用date命令进行时间设置,但在做数据库集群分片等操作时对多台机器的时间差是有要求的,此时就需要使用ntpdate进行时间同步。
yum install -y ntpdate
ntpdate语法:
ntpdate [-46bBdqsuv] [-a key#] [-e delay] [-k file] [-p samples] [-o version#] [-t timeo] [-U username] server
示例:
ntpdate -u 210.72.145.44 #210.72.145.44:中国国家授时中心的官方服务器。
注意:若不加上-u参数, 会出现以下提示:no server suitable for synchronization found。从man ntpdate中可以看出-u参数可以越过防火墙与主机同步。
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参数!
以下是一些可用的NTP服务器地址:
Name |
IP | Location |
210.72.145.44 | 210.72.145.44 | 中国(国家授时中心) |
133.100.11.8 | 133.100.11.8 | 日本(福冈大学) |
time-a.nist.gov | 129.6.15.28 | NIST,Gaithersburg,Maryland |
time-b.nist.gov | 129.6.15.29 | NIST,Gaithersburg,Maryland |
time-a.timefreq.bldrdoc.gov | 132.163.4.101 | NIST,Boulder,Colorado |
time-b.timefreq.bldrdoc.gov | 132.163.4.102 | NIST,Boulder,Colorado |
time-c.timefreq.bldrdoc.gov | 132.163.4.103 | NIST,Boulder,Colorado |
utcnist.colorado.edu | 128.138.140.44 | UniversityofColorado,Boulder |
time.nist.gov | 192.43.244.18 | NCAR,Boulder,Colorado |
time-nw.nist.gov | 131.107.1.10 | Microsoft,Redmond,Washington |
nist1.symmetricom.com | 69.25.96.13 | Symmetricom,SanJose,California |
nist1-dc.glassey.com | 216.200.93.8 | Abovenet,Virginia |
nist1-ny.glassey.com | 208.184.49.9 | Abovenet,NewYorkCity |
nist1-sj.glassey.com | 207.126.98.204 | Abovenet,SanJose,California |
nist1.aol-ca.truetime.com | 207.200.81.113 | TrueTime,AOLfacility,Sunnyvale,California |
nist1.aol-va.truetime.com | 64.236.96.53 | TrueTime,AOLfacility,Virginia |
【Linux】- 同步网络时间的更多相关文章
- 【linux配置】Linux同步网络时间
Linux同步网络时间 1.date '+%Y%M%D' 按照格式显示当前日期,结果如下: [root@LAMP ~]# date "+%Y-%m-%d %H:%M:%S" -- ...
- Linux同步网络时间
1.date '+%Y%M%D' 按照格式显示当前日期,结果如下: [root@LAMP ~]# date "+%Y-%m-%d %H:%M:%S" -- :: 2.date -s ...
- Linux服务器同步网络时间
Linux服务器运行久时,系统时间就会存在一定的误差,一般情况下可以使用date命令进行时间设置,但在做数据库集群分片等操作时对多台机器的时间差是有要求的,此时就需要使用ntpdate进行时间同步. ...
- linux同步Internet时间
输入ntpdate time.nist.gov同步网络时间 如果未安装:yum install ntpdate 结果:3 Jun 15:42:39 ntpdate[4721]: adjust time ...
- NTP同步网络时间
为什么要同步网络时间呢,这是由于树莓派没有RTC和后备电池,不能像PC机那样关机之后仍可以走时. NTP对时步骤: 1 安装ntpdate sudo apt-get install ntpdate s ...
- centos 同步网络时间
centos 同步网络时间 # yum -y install ntp ntpdate # ntpdate cn.pool.ntp.org # date
- linux 修改系统时间 同步网络时间
一.date命令 date -s time 修改系统时钟时间为time 设置时间和日期 例如:将系统日期设定成2018年6月8日的命令 命令 : "date -s 06/08/2018&q ...
- Linux/CentOS 同步网络时间
由于硬件的原因,机器或多或少的跟标准时间对不上,一个月的误差几秒到几分钟不等.对于服务器来说时间不准,会有很多麻烦.例如,支付的时候,无法下单,游戏无法登录等. 方法一:用 ntpdate从时间服务器 ...
- 同步网络时间到linux服务器(先修改时区再进行同步网络时间)
查看时区:date -R 修改整个系统时区: rm -f /etc/localtime ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 网 ...
随机推荐
- Daily Life——团队冲刺博客——(领航篇)
目录 领航目标 各个成员在 Alpha 阶段认领的任务 各个成员的具体任务安排 整个项目预期的任务量 团队成员贡献值的计算规则 燃尽图 Daily Life团队冲刺博客 领航目标 各个成员在 Alph ...
- pixi与lottie-web的benchmark测试
生产版本 "dependencies": { "lottie-web": "^5.5.7", "pixi-spin ...
- Nhibernet Get方法获取数据后,修改字段,未保存,但是数据库的数据却同步了
首先,对象是在session中取得的,所以这个对象已经和数据库同步了,或者说相关联了如果你的session中的对象发生变法,提交事务后,数据库中的数据也会更新未保存更改,不要以为session就不会在 ...
- for循环(foreach型)举例
- CSS中强大的EM(转)
转自:https://www.w3cplus.com/css/px-to-em CSS中强大的EM 作者:大漠 日期:2011-10-27 点击:97370 em 长度单位 编辑推荐:3月31日前,点 ...
- Spring Bean 的生命周期,如何被管理的
1. 实例化一个Bean,也就是我们通常说的new 2. 按照Spring上下文对实例化的Bean进行配置,也就是IOC注入 3. 如果这个Bean实现了BeanNameAware接口,会调用它实现的 ...
- 【Java程序】tesseract_orc java上的一种实现方法
今天想着把以前做过的一个Android的文字检测识别应用好好的回顾一下,因为以前写java程序,目的就是能用就行,不会仔细看每一个部分代码,也不会记他们的用法,不回会去查API,借鉴别人的例程,用过就 ...
- linux make: *** No targets specified and no makefile found. Stop.
[root@localhost Python-]# ./configure checking build system type... x86_64-unknown-linux-gnu checkin ...
- Delphi DBGrid 实现复选框
1 在数据库对应的表中加入 bit 列验证是否被选中 然后dbgrid第一列的filedname是bit列 在DBgrid的onDrawColumnCell事件中写: procedure DBGri ...
- springcloud中provider-product依赖
<dependencies> <dependency> <groupId>cn.lijun.springcloud</groupId> <arti ...