安装 ntpdate
yum install ntpdate -y
测试是否正常
- ntpdate cn.ntp.org.cn
- # 正常情况
- [root@centos7 www]# ntpdate cn.ntp.org.cn
- 3 Mar 20:52:20 ntpdate[9748]: adjust time server 202.108.6.95 offset -0.017460 sec
设置定时任务
- crontab -e
- */10 * * * * ntpdate cn.ntp.org.cn
NTP 服务器列表
区域 [zone] | 域名 [Domain] | IP 池 [IP Pool] |
---|---|---|
中国 [China] | cn.ntp.org.cn | [223.65.211.42][223.65.205.2]223.113.97.99 ,[202.112.29.82] [202.108.6.95] [120.25.108.11] [182.92.12.11] [115.28.122.198] |
中国教育网 [China-EDU] | edu.ntp.org.cn | [202.112.31.197][202.112.29.82][202.118.1.130][202.118.1.81](所有节点由 < em ow="72" oh="17"> 东北大学提供 赞助) |
中国台湾 [ChinaTaiwan] | tw.ntp.org.cn | [123.204.45.116] [103.18.128.60] |
美国 [America] | us.ntp.org.cn | [24.56.178.140] [216.218.254.202] [208.53.158.34] [66.228.42.59] |
新加坡 [Singapore] | sgp.ntp.org.cn | [103.11.143.248] [202.73.57.107] [128.199.134.40] [218.186.3.36] [188.166.245.58] |
韩国 [korea] | kr.ntp.org.cn | [211.233.40.78] [106.247.248.106] |
德国 [Germany] | de.ntp.org.cn | [131.188.3.220] [131.188.3.223] |
日本 [Japan] | jp.ntp.org.cn | [133.100.11.8] [106.187.100.179] [129.250.35.251] |
参考:
全球可用的 NTP 服务器列表与解析服务 - ntp.org.cn & ntpdate.net
来源: http://www.bubuko.com/infodetail-2514674.html