The easiest way to configure NTP is to use the GUI.
- On the top bar, right-click the time and select Preferences
- Click Time Settings and the Set System Time
- Check the box Synchronize date and time over the network
- 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:
- Edit /etc/ntp.conf
- Configure 1 or more server lines like below
- server 0.rhel.pool.ntp.org
- or server 192.168.10.1
- Start the service
- 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
Post a Comment