NTP服务器搭建

NTP服务器搭建 :http://www.jbxue.com/LINUXjishu/22352.html

 

客户端配置:

vim /etc/ntp.conf

#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server  192.168.32.77

 

防火墙修改

iptables -I  INPUT 5 -s 192.168.32.0/24 -m state --state NEW -m udp -p udp --dport 123 -j ACCEPT

 

 

只用NTP服务器同步成功后,NTP客户端才可以同来同步时间。如果需要立刻从指定的时间服务器同步时间,可以使用ntpdate 命令。使用ntpdate 命令时,需要先关闭ntp服务 service ntpd stop。然后执行 ntpdate NTPSERVERIP 即可立即完成时间的同步

 

 

posted @ 2014-06-26 10:36  学无止尽,不忘初心  阅读(272)  评论(0编辑  收藏  举报