Setting up NTP on CentOS

Every network with more than one *nix box on it needs time synchronization. You can use the /usr/sbin/ntpdate command every now and then, or run it from cron. That’s good enough for casual work. But if your machine count is larger, or if you need more accurate synchronisation, having a local time source on your LAN may be desirable.

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