zoukankan      html  css  js  c++  java
  • 时间同步服务器

    一,服务端配置

      安装时间服务软件ntp

       yum install ntp -y

       rpm -qa ntp

            配置时间同步服务器

        egrep -v "^$|#" /etc/ntp.conf.bak >/etc/ntp.conf

        vim /etc/ntp.conf

     1 driftfile /var/lib/ntp/drift
     2 restrict default kod nomodify notrap nopeer noquery
     3 restrict -6 default kod nomodify notrap nopeer noquery
     4 restrict 127.0.0.1 
     5 restrict -6 ::1
     6 restrict 172.16.1.0 mask 255.255.255.0 nomodify notrap
     7 server time1.aliyun.com
     8 server ntp1.aliyun.com
     9 restrict time1.aliyun.com  nomodify notrap noquery
    10 restrict ntp1.aliyun.com  nomodify notrap noquery
    11 server  127.127.1.0    
    12 fudge   127.127.1.0 stratum 10
    13 includefile /etc/ntp/crypto/pw
    14 keys /etc/ntp/keys
    启动ntp时间服务器
    /etc/init.d/ntpd start
    查看时间服务器节点
    ntpq -p
    二,客户机时间同步
    ntpdate 10.0.0.70
     
  • 相关阅读:
    NIO简述
    函数式编程
    ReadWriterLock读写锁
    Semaphore工具类使用
    CyclicBarrier工具类使用
    CountDownLatch工具类使用
    创建VUE+Element-UI项目
    <slot>插板使用
    Spring面试题
    实现定时任务的几种方式
  • 原文地址:https://www.cnblogs.com/kingle-study/p/9689980.html
Copyright © 2011-2022 走看看