时间同步服务器

一,服务端配置

  安装时间服务软件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
 

 

posted on 2018-09-22 13:44  kingle-l  阅读(223)  评论(0编辑  收藏  举报

levels of contents