简单配置NTP服务器

早上朋友打电话过来作了个NTP服务器一直不成功,而后本身也配置了一下,服务器

本人用的是redhat 5.3ide

yum install ntpui

不少时候系统已经安装的了rest

修改配置文件  vi /etc/ntp.conf server

restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap    ---容许同步服务器的网段
 rem

#server 192.168.1.90              ---这个能够不写的只留下最后2个
server 127.127.1.0                    --意思是获取本机时间做为NTP服务器标准时间
fudge   127.127.1.0 stratum 10同步

保存退出it

/etc/init.d/ntpd startio

查看一下有没有运行 lsof -i:123table

在客户端运行 ntpdate 192.168.1.90   同步时间

出现“no server suitable for synchronization found ” 多是你等待时间还不够。

缘由是服务器还没更新本地时间,怎么么看呢,能够运行下命令  watch ntpq -p

-------------------------------------

Every 2.0s: ntpq -p                                            Sat Dec  4 18:04:30 2010

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 squid.dog.com   .INIT.          16 u    -   64    0    0.000    0.000   0.000
*LOCAL(0)        .LOCL.          10 l   29   64    1    0.000    0.000   0.001
 

when 一直在跳  当reach的值变成17就会暂时停下来了,这时候就能够在客户端使用

ntpdate -d 192.168.1.90  来检测是否成功了

最后同步

ntpdate 192.168.1.90

相关文章
相关标签/搜索