Linux同步网络时间
来源:互联网 发布:网络被骗多少钱立案 编辑:程序博客网 时间:2024/06/06 05:55
Linux服务器运行久时,系统时间就会存在一定的误差,一般情况下可以使用date命令进行时间设置,但在做数据库集群分片等操作时对多台机器的时间差是有要求的,此时就需要使用ntpdate进行时间同步
安装:
yum install ntpdate
ntpdate简单用法:
# ntpdate ip# ntpdate 210.72.145.44
date命令:
date :查看当前时间,结果如下:Tue Mar 4 01:36:45 CST 2014date -s 09:38:40 :设置当前时间,结果如下:Tue Mar 4 09:38:40 CST 2014
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.44NTP服务器(上海) :ntp.api.bz
美国:time.nist.gov 复旦:ntp.fudan.edu.cn 微软公司授时主机(美国) :time.windows.com 台警大授时中心(台湾):asia.pool.ntp.org
经测试中国国家授时中心与NTP上海服务器可以正常同步时间,注意需要加上-u参数!
以下是一些可用的NTP服务器地址:
Name
IPLocation210.72.145.44210.72.145.44中国(国家授时中心)133.100.11.8133.100.11.8日本(福冈大学)time-a.nist.gov129.6.15.28NIST,Gaithersburg,Marylandtime-b.nist.gov129.6.15.29NIST,Gaithersburg,Marylandtime-a.timefreq.bldrdoc.gov132.163.4.101NIST,Boulder,Coloradotime-b.timefreq.bldrdoc.gov132.163.4.102NIST,Boulder,Coloradotime-c.timefreq.bldrdoc.gov132.163.4.103NIST,Boulder,Coloradoutcnist.colorado.edu128.138.140.44UniversityofColorado,Bouldertime.nist.gov192.43.244.18NCAR,Boulder,Coloradotime-nw.nist.gov131.107.1.10Microsoft,Redmond,Washingtonnist1.symmetricom.com69.25.96.13Symmetricom,SanJose,Californianist1-dc.glassey.com216.200.93.8Abovenet,Virginianist1-ny.glassey.com208.184.49.9Abovenet,NewYorkCitynist1-sj.glassey.com207.126.98.204Abovenet,SanJose,Californianist1.aol-ca.truetime.com207.200.81.113TrueTime,AOLfacility,Sunnyvale,Californianist1.aol-va.truetime.com64.236.96.53TrueTime,AOLfacility,Virginia
知识只有共享才能传播,才能推崇出新的知识,才能学到更多,这里写的每一篇文字/博客,基本都是从网上查询了一下资料然后记录下来,也有些是原滋原味搬了过来,也有时加了一些自己的想法
0 0
- Linux 同步网络时间
- Linux同步网络时间
- Linux同步网络时间
- linux ntpdate同步网络时间
- Linux ntpdate同步网络时间
- Linux服务器同步网络时间
- linux工具rdate:同步网络时间
- 设置linux服务器时间与网络同步
- linux下使用ntpdate同步网络时间
- Linux 设置系统时间与网络时间同步
- 网络时间同步
- C#同步网络时间
- C#同步网络时间
- C#同步网络时间
- C#同步网络时间
- C#同步网络时间
- 通过网络同步时间
- 通过网络同步时间
- 正则表达式匹配中文的情况
- TensorFlow (RNN)深度学习 双向LSTM(BiLSTM)+CRF 实现 sequence labeling 序列标注问题 源码下载
- html5移动端点击不会全屏播放的播放器
- 《统计学习方法》的一些点
- C语言模拟实现C++多态
- Linux同步网络时间
- # windows 环境下面创建RabbitMQ集群
- Python-pyspark中常见问题总结
- 关于Adroid studio 导入项目时,一直build project的问题
- [linux上路] 开发环境准备五 Debian8 中文输入法安装
- CSS布局:水平居中
- django网站设计与规划【Tango with Django】
- Linxu学习——第3章 命令基本格式及文件处理命令
- mysql 命令以及函数