配置NTP服務
1.安裝chronyd
yum install chrony -y
2.修改配置文件,使計算節點與控制節點同步時間
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
添加:
server 192.168.0.10 iburst
3.啓動chronyd服務並設置開機啓動
systemctl enable chronyd.service && systemctl start chronyd.service
4.查看時間同步狀態,當前同步的源爲controller1
chronyc sources
5.查看時間是否與控制節點一致
timedatectl
看到NTP synchronized: yes就說明已經同步成功了。
初版只需要準備這一個環境就夠了。