ntp

The purpose of this document is to explain how to setup ntp (Network Time Protocol sync on Linux).

  • which ntpdate # Check if you need to install it

    • daily_hourly="daily"

      • daily_hourly="hourly"

  • grep -R ntpdate /etc/cron* # Check if it is already setup, if not, continue.

  • yum -y install ntp # Also installs ntpdate. Use apt-get on Ubuntu.

  • echo "ntpdate pool.ntp.org" > /etc/cron.${daily_hourly}/ntpdate

  • chmod u+x /etc/cron.${daily_hourly}/ntpdate

  • /etc/cron.${daily_hourly}/ntpdate

  • date # Check for the right result here against your atomic clock

[Edit]