sudo yum install ntp ntpdate &&
sudo systemctl start ntpd.service &&
sudo systemctl enable ntpd.service
如果要使 NTP 服务尽快开始同步,执行以下命令。可以将 pool.ntp.org 替换为你的 NTP 服务器
sudo systemctl stop ntpd.service &&
sudo ntpdate pool.ntp.org &&
sudo systemctl start ntpd.servic