chauncy-y

服务器端:

1.装包

略。。。。

2.修改ntp服务配置文件

配置文件位置:/etc/ntp.conf

修改内容:

#设置与服务器时间同步的IP网段,以下内容即为192.168.x.x机器可与服务器同步

restrict 192.168.0.0 mask 255.255.0.0

#设置ntp服务器自身同步的服务器IP127.127.1.0意为与服务器自身进行同步

#如果在最后添加prefer则表示此主机为优先同步

server 127.127.1.0

#这行是时间服务器的层次。设为0则为顶级,如果要向别的NTP服务器更新时间,请不要#把它设为0

fudge 127.127.1.0 stratum 10

3.重启服务

客户端:

1.装包

2.修改ntp服务配置文件

配置文件位置:/etc/ntp.conf

修改内容:

#添加一个server字段,指明向哪个服务器同步

Server 192.168.146.100

3.同步ntp

ntpdate -u 192.168.146.100

 

相关错误:

1.20 Jul 13:25:08 ntpdate[2299]: no server suitable for synchronization found

使用ntpdate -d 192.168.146.100来查看,如果输出

192.168.146.100: Server dropped: strata too high

表明 fudge 127.127.1.0 stratum 10设置错误,首先正常情况stratum这个值得局限是“0~15”如果报16,而stratum设置正常,检查IP是否可用

 

 

相关参考:

 

http://wangyou871228.blog.163.com/blog/static/27695152201379101059990/

http://www.cnblogs.com/kerrycode/archive/2015/08/20/4744804.html

 

分类:

技术点:

相关文章:

  • 2021-07-31
  • 2021-09-29
  • 2021-06-13
  • 2022-12-23
  • 2021-08-17
  • 2021-12-09
  • 2022-12-23
猜你喜欢
  • 2021-12-19
  • 2021-11-24
  • 2021-12-09
  • 2021-09-23
  • 2022-12-23
  • 2022-01-22
相关资源
相似解决方案