zoukankan      html  css  js  c++  java
  • 所有节点配置NTP服务

    主节点:

    打开vim /etc/ntp.conf文件

     1  For more information about this file, see the man pages
     2 # ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
     3 
     4 driftfile /var/lib/ntp/drift
     5 
     6 # Permit time synchronization with our time source, but do not
     7 # permit the source to query or modify the service on this system.
     8 restrict default kod nomodify notrap nopeer noquery
     9 #restrict -6 default kod nomodify notrap nopeer noquery
    10 
    11 # Permit all access over the loopback interface.  This could
    12 # be tightened as well, but to do so would effect some of
    13 # the administrative functions.
    14 restrict 192.168.133.131 nomodify notrap nopeer noquery #该节点的IP地址
    15 restrict 127.0.0.1
    16 restrict -6 ::1
    17 
    18 # Hosts on local network are less restricted.
    19 restrict 192.168.133.2 mask 255.255.255.0 nomodify notrap #网关和子网掩码
    20 
    21 # Use public servers from the pool.ntp.org project.
    22 # Please consider joining the pool (http://www.pool.ntp.org/join.html).
    23 #server 0.rhel.pool.ntp.org iburst
    24 57 lines yanked    
    25 
    26 server  127.127.1.0
    27 fudge   127.127.1.0 stratum 8

    从节点

    vim vim /etc/ntp.conf

     1 # For more information about this file, see the man pages
     2 # ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
     3 
     4 driftfile /var/lib/ntp/drift
     5 
     6 # Permit time synchronization with our time source, but do not
     7 # permit the source to query or modify the service on this system.
     8 restrict default  nomodify notrap nopeer noquery
     9 #restrict -6 default kod nomodify notrap nopeer noquery
    10 
    11 # Permit all access over the loopback interface.  This could
    12 # be tightened as well, but to do so would effect some of
    13 # the administrative functions.
    14 
    15 restrict 192.168.133.129  nomodify notrap nopeer noquery#该节点IP地址
    16 restrict 127.0.0.1
    17 restrict -6 ::1
    18 
    19 # Hosts on local network are less restricted.
    20 restrict 192.168.133.2 mask 255.255.255.0 nomodify notrap
    21 
    22 
    23 
    24 #server 2.rhel.pool.ntp.org iburst
    25 #server 3.rhel.pool.ntp.org iburst
    26 server 192.168.133.136 #主机IP地址
    27 fudge 192.168.133.136 stratum 8
  • 相关阅读:
    Excel2010表格里设置每页打印时都有表头
    新手常见Python运行时错误
    如何查看某个端口被谁占用
    ubuntu更换阿里源
    c# 值类型与引用类型(转)
    vs2015 企业版 专业版 密钥
    csdn中使用Git的一些注意问题
    在notepad++中快速插入当前时间方法
    EF6 code first 新建项目注意问题
    vs2015新建web应用程序空模板和添加webapi的模板生成文件的比较
  • 原文地址:https://www.cnblogs.com/wangleBlogs/p/9619286.html
Copyright © 2011-2022 走看看