云服务器快速配置阿里巴巴NTP(网络时间协议)服务

  • 内容
  • 评论
  • 相关

一.为什么要切换使用阿里云的公共NTP服务器呢?

NTP 是网络时间协议 (Network Time Protocol),它是用来同步网络中各个计算机的时间的协议。

为什么修改云服务器的DNS呢,中国时间服务器,国内阿里云时间服务器

很多用户使用的是国外VPS

使用过程中常常遇到时间与国内不同步的情况

好在阿里提供了NTP服务器,地址如下:

阿里云镜像站官网:https://developer.aliyun.com/mirror/

阿里云NTP服务器官网:https://developer.aliyun.com/mirror/NTP

二.如何切换使用阿里云NTP服务器。

Linux 服务器上快速配置阿里巴巴 OPSX NTP服务

编辑文件 "/etc/ntp.conf",根据情况修改文件内容为:

· 互联网上的服务器:

driftfile  /var/lib/ntp/drift

pidfile   /var/run/ntpd.pid

logfile /var/log/ntp.log

restrict    default kod nomodify notrap nopeer noquery

restrict -6 default kod nomodify notrap nopeer noquery

restrict 127.0.0.1

server 127.127.1.0

fudge  127.127.1.0 stratum 10

server ntp.aliyun.com iburst minpoll 4 maxpoll 10

restrict ntp.aliyun.com nomodify notrap nopeer noquery

 

 

· 阿里云 ECS 服务器:

driftfile  /var/lib/ntp/drift

pidfile   /var/run/ntpd.pid

logfile /var/log/ntp.log

restrict    default kod nomodify notrap nopeer noquery

restrict -6 default kod nomodify notrap nopeer noquery

restrict 127.0.0.1

server 127.127.1.0

fudge  127.127.1.0 stratum 10

server ntp.aliyun.com iburst minpoll 4 maxpoll 10

restrict ntp.aliyun.com nomodify notrap nopeer noquery

server ntp1.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

restrict ntp1.cloud.aliyuncs.com nomodify notrap nopeer noquery

server ntp2.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

restrict ntp2.cloud.aliyuncs.com nomodify notrap nopeer noquery

server ntp3.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

restrict ntp3.cloud.aliyuncs.com nomodify notrap nopeer noquery

server ntp4.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

restrict ntp4.cloud.aliyuncs.com nomodify notrap nopeer noquery

server ntp5.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

restrict ntp5.cloud.aliyuncs.com nomodify notrap nopeer noquery

server ntp6.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

restrict ntp6.cloud.aliyuncs.com nomodify notrap nopeer noquery

三.其他公共推荐的NTP服务器

使用以前请先ping相应的域名查看网络是否可达,和相应的访问速度

 

ntp.ntsc.ac.cn 中国国家授时中心

cn.ntp.org.cn  中国授时

 

阿里云NTP时间源服务器

ntp1.aliyun.com

ntp2.aliyun.com

ntp3.aliyun.com

ntp4.aliyun.com

ntp5.aliyun.com

ntp6.aliyun.com

ntp7.aliyun.com

 

国内一些大学NTP时间源服务器

s1a.time.edu.cn 北京邮电大学

s1b.time.edu.cn 清华大学

s1c.time.edu.cn 北京大学

s1d.time.edu.cn 东南大学

s1e.time.edu.cn 清华大学

s2a.time.edu.cn 清华大学

s2b.time.edu.cn 清华大学

s2c.time.edu.cn 北京邮电大学

s2d.time.edu.cn 西南地区网络中心

s2e.time.edu.cn 西北地区网络中心

s2f.time.edu.cn 东北地区网络中心

s2g.time.edu.cn 华东南地区网络中心

s2h.time.edu.cn 四川大学网络管理中心

s2j.time.edu.cn 大连理工大学网络中心

s2k.time.edu.cn CERNET桂林主节点

s2m.time.edu.cn 北京大学

 

另外,如果服务器在国外,苹果提供的公共NTP服务,以下7个域名

http://time1.apple.com

http://time2.apple.com

http://time3.apple.com

http://time4.apple.com

http://time5.apple.com

http://time6.apple.com

http://time7.apple.com

 

Google(谷歌)提供的NTP服务,以下4个域名

http://time1.google.com

http://time2.google.com

http://time3.google.com

http://time4.google.com

 

 

 

本文标签:

版权声明:若无特殊注明,本文皆为《菜鸟站长》原创,转载请保留文章出处。

本文链接:云服务器快速配置阿里巴巴NTP(网络时间协议)服务 - http://wziyi.net/?post=324

发表评论

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