6

国家授时中心NTP服务器ip是多少?更换成阿里云NTP多快好省

 3 years ago
source link: https://www.ffeeii.com/1758.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

国家授时中心NTP服务器ip是多少?更换成阿里云NTP多快好省

Published 2020年7月3日

电脑发现有时差,差几分钟,有时候测试程序就差距大了,为了解决这个问题,需要更换NTP地址。

利用互联网传送标准时间称为网络授时。目前,国家授时中心提供两种计算机网络时间服务:SNTP(Simple Network Time Protocol)校时软件服务和“时间精灵”服务。网络授时精度一般为几十毫秒~几百毫秒。
国家授时中心SNTP校时服务的IP地址是:210.72.145.44。

原文链接:http://www.ntsc.cas.cn/kxcb/kpwz/201007/t20100716_2904131.html

不过测下来,发现IP已不好使用。解决办法是直接使用阿里云的ntp服务器。

阿里云NTP服务器地址:

ntp.aliyun.com
resize,m_fill,h_494,w_1024
阿里云NTP服务器地址

使用公网方式的,就是自己电脑用的,ntp-ntp7都可以使用。如果是自己的服务器,建议使用经典网络内网和专有网络VPC内网方式连接NTP服务器。

Mac电脑设置ntp办法:

sudo vim /etc/ntp.conf
加入以下三行内容:
ntp.aliyun.com
ntp1.aliyun.com
server time.asia.apple.com
#wp 保持退出

Centos修改时区步骤:

  • 执行命令sudo rm /etc/localtime删除系统里的当地时间链接。
  • 执行命令sudo vi /etc/sysconfig/clock,用vim打开并编辑配置文件/etc/sysconfig/clock。
  • 输入i添加时区城市。例如添加Zone=Asia/Shanghai,按下Esc键退出编辑并输入:wq保存并退出。
  • 可执行命令ls /usr/share/zoneinfo查询时区列表,Shanghai为列表条目之一。
  • 执行命令sudo ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime更新时区修改内容。
  • 执行命令hwclock -w更新硬件时钟(RTC)。
  • 执行命令sudo reboot重启实例。
  • 执行命令date -R查看时区信息是否生效,未生效可按照上述步骤重新操作一遍。

Be First to Comment

发表评论 取消回复

电子邮件地址不会被公开。 必填项已用*标注

Comment

Name*

Email*

Website

在此浏览器中保存我的名字、电邮和网站。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK