1
|
yum -y install chrony |
1
|
timedatectl set-timezone Asia/Shanghai |
1
|
vi /etc/chrony.conf
|
1 2 3 4 5 6 7 |
# 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 controller iburst allow 192.168.100.0/24 local stratum 10 |
1 2 |
systemctl enable chronyd.service systemctl start chronyd.service |
1
|
timedatectl set-ntp yes |
1
|
yum -y install chrony |
1
|
vi /etc/chrony.conf
|
1
|
server controller iburst |
1 2 |
systemctl enable chronyd.service systemctl restart chronyd.service |
1
|
chronyc sources
|
控制节点和计算节点(x86-compute和arm-compute节点)显示controller为时钟源。
通过date命令查看时间是否同步,如果时间同步失败,可以尝试先关闭NTP服务,再开启NTP服务来解决:
timedatectl set-ntp no timedatectl set-ntp yes