NTP 配置
两个节点检查是否安装ntp
rpm -q ntp ///如果没安装就yum -y install ntp 进行安装///
systemctl enable ntpd systemctl enable ntpd.service 设置开机启动ntp
systemctl start ntpd // 启动ntp
systemctl status ntpd //查看ntp状态
------racdb1 //作为NTP服务端和客户端配置----------
vi /etc/ntp.conf
**# 外部时间服务器不可用时,以本地时间作为时间服务
server 127.127.1.0
fudge 127.127.1.0 stratum 10
#允许内网其他机器同步时间,如果不添加该约束默认允许所有IP访问本机同步服务
restrict 192.168.61.0 mask 255.255.255.0 nomodify notrap
**# 配置和上游标准时间同步
server 101.201.72.121 # 中国国家授时中心
server 133.100.11.8 #日本[福冈大学]
server 3.cn.pool.ntp.org
server 1.asia.pool.ntp.org
server 3.asia.pool.ntp.org
#允许上层时间服务器主动修改本机时间
restrict 101.201.72.121 nomodify notrap noquery
restrict 133.100.11.8 nomodify notrap noquery
restrict 3.cn.pool.ntp.org nomodify notrap noquery
restrict 1.asia.pool.ntp.org nomodify notrap noquery
restrict 3.asia.pool.ntp.org nomodify notrap noquery
vi /etc/sysconfig/ntpd
#此选项用于自动校准系统时钟与硬件时钟
SYNC_HWCLOCK=yes
OPTIONS="-x -u