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

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

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

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

很多用户使用的是国外VPS

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

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

阿里云镜像站官网:阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区

阿里云NTP服务器官网:NTP镜像-NTP下载地址-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

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值