How to set time synchronization in linux

  1. yum install ntp : install ntpdate.
  2. ntpdate time.nist.gov: After installation, test it directly.

  3. crontab -e: Enter into crontab.

  4. Increase the command */10 * * * * ntpdate time.nist.gov: this means that it is executed every 10 minutes, if the time frequency does not want to be so high, you can adjust these *

  5. * */1 * * * ntpdate time.nist.gov: Updated every hour.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325548834&siteId=291194637