Home > CentOS > Setup ntpdate

Install ntpdate

yum install ntp

Sync with Hong Kong Observatory

ntpdate stdtime.gov.hk

Write the time to BIOS

hwclock -w

Set a cron job to sync the time automatically

10 4 * * * root (/usr/sbin/ntpdate stdtime.gov.hk && /sbin/hwclock -w) &> /dev/null

reference: http://linux.vbird.org/linux_server/0440ntp.php



Flag Counter