Update time from time server with ntpdate [Centos time synchronization]
Update time from time server with ntpdate [Centos time synchronization]
Update time from the time server with ntpdate
If your linux system does not have the command ntpdate at all
# yum install ntp
After installation, you don't have to do any configuration, just test it.
The code is as follows:
# ntpdate pool.ntp.org
If the display time is normal, prove that the synchronization is successful, and then add the following to the crontab:
# crontab-e
* / 5 * ntpdate pool.ntp.org # enter domain name or IP
Synchronize every five minutes