linux 顶级ntp服务器配置

1、安装ntp包

2、修改/etc/ntp.conf文件,内容如下

1 # Use public servers from the pool.ntp.org project.
2 # Please consider joining the pool (http://www.pool.ntp.org/join.html).
3 #server 0.centos.pool.ntp.org
4 #server 1.centos.pool.ntp.org
5 #server 2.centos.pool.ntp.org

   首先注释掉上层server代码,

1 # Undisciplined Local Clock. This is a fake driver intended for backup
2 # and when no outside source of synchronized time is available.
3 server  127.127.1.0     # local clock
4 fudge   127.127.1.0 stratum 0
将fudge开头描述当前ntpserver处于的层级设置为0,即为顶级ntp server
1 restrict 192.168.56.0 mask 255.255.255.0 nomodify notrap
修改描述允许使用本ntp server进行同步的client所处的网段

3、

1 service ntpd restart

4、注意iptables

    upd  123端口

5、等待ntp服务器和本地时间同步,这需要一些时间

出现这个时,表示ntp server可以对外提供服务了。

如果没有与本地同步成功,则出现如下图

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值