I am using the NTP service to synchronize the time.
1. Install NTP
yum install ntp2. Execute the command line
ntpdate -u ntp.api.bz
This command statement means: synchronize the time of the local server with the time on ntp.api.bz; where ntp.api.bz is the NTP server in Shanghai.
It can also be synchronized to other servers, http://www.ntp.org.cn/
The following errors may be reported during the synchronization process:
no server suitable for synchronization found
The reason for this error may be: the synchronization server you selected is incorrect, try to change the synchronization server.