Login as the root user
Type the following command to install ntp
# yum install ntp
Turn on service
# chkconfig ntpd on
Synchronize the system clock with 0.pool.ntp.org server:
# ntpdate pool.ntp.org
Start the NTP:
# /etc/init.d/ntpd start
To remain updated, you should put a cron entry to sync with time server every midnight:
# crontab -e 0 4 * * * /usr/sbin/ntpdate pool.ntp.org
This will update/correct your time in server at 04:00 am every morning.
Advertisement