安裝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
設(shè)置定時(shí)任務(wù)
crontab -e
*/10 * * * * ntpdate cn.ntp.org.cn
NTP服務(wù)器列表
| 區(qū)域[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] |
| 中國教育網(wǎng)[China-EDU] | edu.ntp.org.cn | [202.112.31.197][202.112.29.82][202.118.1.130]202.118.1.81 |
| 中國臺(tái)灣[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] |
參考: