节点之间服务器同步

节点之间服务器同步:
1. 修改服务器主机时间
date -s '2018-08-07 18:56:00'
2.将修改后的时间同步到硬件
clock -w
hwclock --systohc
3.在时间服务器节点/etc/ntp.conf添加
restrict 192.168.17.0 mask 255.255.255.0 nomodify notrap
server 127.127.1.0
fudge 127.127.1.0 stratum 0
4.在客户节点ntp.conf添加时间服务器:
server 192.168.17.5 # local clock
4.让防火墙开放tcp,udp的123端口,/etc/services可以查看这个端口。如果iptables没开启就不用管
5.service ntpd restart重启所有服务
6.添加ntpd到系统服务
chkconfig add ntpd
chkconfig --level 345 ntpd on

posted @ 2018-08-07 20:43  uuhh  阅读(442)  评论(0编辑  收藏  举报