NTP时间服务器配置
安装chrony包
yum-yinstall chrony
修改/etc/chrony.conf配置文件
vim/etc/chrony.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
server10.99.82.200 iburst#新增NTP服务器配置
启动NTP服务,并设置开机自启
systemctlstartchronyd
systemctl enable chronyd
[root@auth-data01 ~]# systemctl is-enabled chronyd #确认服务是否开机启动
enabled
查看时间同步状态
[root@auth-app02 ~]# timedatectl
Local time: Tue2019-08-0612:00:20 CST
Universal time: Tue2019-08-0604:00:20 UTC
RTC time: Tue2019-08-0603:59:14
Time zone: Asia/Shanghai (CST,+0800)
NTP enabled:yes #NTP服务开启
NTP synchronized:yes #NTP服务同步成功
RTCinlocal TZ: no
DST active: n/a