首页 > 其他 > 详细

配置一台时间服务器

时间:2017-01-26 18:53:55      阅读:260      评论:0      收藏:0      [点我收藏+]

1、配置一台时间服务器,让其它主机和时间服务器同步,并实现自动化任务每5分钟同步一次。

  #Server:开启ntp

      vi /etc/ntp.conf

        driftfile /var/lib/ntp/drift

restrict default nomodify notrap nopeer noquery

restrict 127.0.0.1

restrict ::1

restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

server s1a.time.edu.cn

server s1b.time.edu.cn

server 202.120.2.101

includefile /etc/ntp/crypto/pw

keys /etc/ntp/keys

disable monitor

 systemctl restart ntpd

 

#client

  vi /etc/ntp.conf

    driftfile /var/lib/ntp/drift

restrict default nomodify notrap nopeer noquery

restrict 127.0.0.1

restrict ::1

server 192.168.1.142

includefile /etc/ntp/crypto/pw

keys /etc/ntp/keys

disable monitor

crontab –e

*/5 * * * * /usr/sbin/ntpdate 192.168.1.142

技术分享

技术分享

 

技术分享

技术分享

技术分享

 

配置一台时间服务器

原文:http://www.cnblogs.com/han1094/p/6351813.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!