温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

部署企业内部NTP时间服务器

发布时间:2020-07-25 02:15:32 来源:网络 阅读:1381 作者:lihuansong 栏目:建站服务器

部署企业内部NTP时间服务器,假设node0作为NTP时间服务器主节点,node1, node2都是ntp客户端从节点,内部网段10.10.75.0。

  1. 所有节点通过yum命令安装ntp,命令如下:yum install ntp 。

  2. 修改node0节点的配置文件/etc/ntp.conf,
    内容如下:
    server 0.cn.pool.ntp.org
    server 0.asia.pool.ntp.org
    server 3.asia.pool.ntp.org
    restrict 0.cn.pool.ntp.org nomodify notrap noquery
    restrict 0.asia.pool.ntp.org nomodify notrap noquery
    restrict 3.asia.pool.ntp.org nomodify notrap noquery
    #10.10.75.0网段的服务器都可以使用NTP服务器来同步时间。
    restrict default ignore
    restrict 10.10.75.0 mask 255.255.255.0 notrap nomodify
    server 127.127.1.0 prefer
    fudge 127.127.1.0 stratum 10

3.在node1、node2节点上,编辑/etc/ntp.conf
添加一句server NTP时间同步服务器IP地址 prefer

4.所有节点启动 ntp服务,把ntp服务设置为开机自启动,命令如下
service ntpd start
chkconfig ntpd on

  1. 从节点先使用ntpdate手动同步一下时间命令如下:ntpdate -u 主节点IP地址
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI