NTP服务器配置
OS: CentOS6.7_x64
目前可参看的NTP服务器列表:
区域[zone]
域名[Domain]
IP池[IP Pool]
中国[China]
cn.ntp.org.cn
[202.108.6.95] [202.112.29.82] [110.75.190.198] [115.28.122.198] [182.92.12.11]
[120.25.108.11] [110.75.186.249] [110.75.186.248] [110.75.186.247]
中国台湾[ChinaTaiwan]
tw.ntp.org.cn
[120.119.28.1]
美国[America]
us.ntp.org.cn
[24.56.178.140] [131.107.13.100]
新加坡[Singapore]
sgp.ntp.org.cn
[139.162.20.174] [103.11.143.248]
韩国[korea]
kr.ntp.org.cn
[218.234.23.44] [211.233.40.78]
德国[Germany]
de.ntp.org.cn
[131.188.3.220] [131.188.3.223]
日本[Japan]
jp.ntp.org.cn
[133.243.238.243] [157.7.152.213]
NTP服务端口:
Port_123
服务端配置(192.168.1.98):
安装ntp软件包
修改/etc/ntpd.conf
1 配置允许同步网段
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
2 配置外网时间服务器
server 202.108.6.95
server 110.75.190.198
3 重启ntpd服务
/etc/init.d/ntpd restart
4 查看同步情况
[iyunv@ob-salt01 etc]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*202.108.6.95 10.6.63.22 2 u 5 64 377 28.201 34.499 10.666
110.75.190.198 .INIT. 16 u - 256 0 0.000 0.000 0.000
[iyunv@ob-salt01 etc]#
客户端测试(192.168.1.101):
[iyunv@ob-nfs01 ~]# ntpdate 192.168.1.98
15 Sep 21:40:44 ntpdate[1773]: adjust timeserver 192.168.1.98 offset 0.002040 sec
客户端配置计划任务
50 21 * * * /usr/sbin/ntpdate 192.168.1.98>> /var/log/ntpdate.log 2>&1
|