NTP -- Synchronize time using other NTP peers

The easiest way to configure NTP is to use the GUI.

  1. On the top bar, right-click the time and select Preferences
  2. Click Time Settings and the Set System Time
  3. Check the box Synchronize date and time over the network
  4. Edit the list of NTP servers and click OK

Alternatively, you can execute system-config-date to go directly to step 3.

To perform the same via command line:

  1. Edit /etc/ntp.conf
    1. Configure 1 or more server lines like below
      1. server 0.rhel.pool.ntp.org
      2. or server 192.168.10.1
  2. Start the service
    1. service ntpd start

When all finished, make sure ntpd is set to start automatically for next reboot chkconfig ntpd on.
You can also perform a one-off sync by running ntpdate 192.168.10.1 (this only works if ntpd isnt running)

Comments