时区同步
- 第一步:
yum install -y ntp
//安装ntp服务 - 第二步:
vi /etc/ntp.conf
//配置
#主节点
#当前IP地址
restrict 192.168.95.101 nomodify notrap nopeer noqurey
#集群所在的网段网关、子网掩码
restrict 192.168.95.0 mask 255.255.255.0 nomodify notrap
server 127.127.1.0
fudge 127.127.1.0 stratum 10
#所有副节点:
server 127.127.1.0
fudge 127.127.1.0 stratum 10
- 第三步:
service ntpd start
//启动服务 - 第四步:
chkconfig ntpd on
//设置开机自启动 - 第五步:
ntpstat
//查看ntp状态