码迷,mamicode.com
首页 > 其他好文 > 详细

NTP服务器配置

时间:2016-12-04 17:41:10      阅读:279      评论:0      收藏:0      [点我收藏+]

标签:服务器   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


本文出自 “Clark的运维” 博客,请务必保留此出处http://szcat.blog.51cto.com/665775/1879274

NTP服务器配置

标签:服务器   ntp   配置   

原文地址:http://szcat.blog.51cto.com/665775/1879274

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!