Currently, native CentOS 8 does not support setting the NTP service. Instead, you need to use chronyd to deliver accurate time. This document describes how to install and configure chronyd on a CentOS 8-based Tencent Cloud CVM instance.
yum -y install chrony
#log measurements statistics tracking.
The result should be as follows:
server time1.tencentyun.com iburst server time2.tencentyun.com iburst server time3.tencentyun.com iburst server time4.tencentyun.com iburst server time5.tencentyun.com iburst
systemctl restart chronyd
systemctl enable chronyd
If a result similar to the following is returned, the configuration was successful.
chronyc sourcestats -v
||Check the clock source.|
||Check the clock source status.|
||Set the real time clock. The default format is UTC.|
||Enable the NTP service for synchronization.|
||Calibrate the NTP server.|
||Force synchronization of the system clock.|