NTP服務器配置

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 查看同步情況

[root@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

[root@ob-salt01 etc]#

 

 

客戶端測試(192.168.1.101):

[root@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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章