安裝ntp服務
sudo yum install ntp
sudo systemctl enable ntpd
修改NTP配置
vi /etc/ntp.conf
將時間服務器換成國內的
server
0.cn.pool.ntp.orgserver
1.cn.pool.ntp.orgserver
2.cn.pool.ntp.orgserver
3.cn.pool.ntp.org
重啓NTP服務
sudo systemctl restart ntpd
檢查時間是否同步
date
參考
https://www.howtogeek.com/tips/how-to-sync-your-linux-server-time-with-network-time-servers-ntp/