首页 > 其他 > 详细

centos 7.0 NTP服务搭建

时间:2016-10-22 14:55:11      阅读:291      评论:0      收藏:0      [点我收藏+]

 

NTP服务时间同步

关闭防火墙和selinux或开启防火墙所有服务

[root@server ~]# firewall-cmd --set-default-zone=trusted 

NTP服务

[root@server ~]# yum –y install ntp

[root@server ~]# cat /etc/ntp.conf                    //修改配置文件                             //定义本机与自己同步时间

restrict 176.20.32.0 mask 255.255.255.0 nomodify    //允许哪些主机同步时间

#server 0.rhel.pool.ntp.org iburst

#server 1.rhel.pool.ntp.org iburst

#server 2.rhel.pool.ntp.org iburst

#server 3.rhel.pool.ntp.org iburst

server 127.127.1.0 iburst    //定义本机与自己同步时间

fudge 127.127.1.0 stratum 3

includefile /etc/ntp/crypto/pw

keys /etc/ntp/keys

disable monitor

客户端测试NTP服务

[root@client ~]# ntpdate 172.25.0.254

14 Jul 02:14:02 ntpdate[6052]: adjust time server 172.25.0.254 offset 0.031270 sec   //表试成功

centos 7.0 NTP服务搭建

原文:http://www.cnblogs.com/liusl/p/5987523.html

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