You down with NTP… Yeah you know me!

 
NTP stands for Network Time Protocol, and it is an Internet protocol used to synchronize the clocks of computers to some time reference.

Type the following command to install NTP.

# yum install ntp

Setup the time sync.

# echo 0.centos.pool.ntp.org > /etc/ntp/step-tickers

Set the run levels required for the ntpd service.

# chkconfig --level 345 ntpd on

Start the NTP service.

# service ntpd start

Once the clock is synchronized for the first time, run the following command to set the Hardware Clock to the current System Time.

# hwclock -w

Use either of the following commands verify if the NTP process is running:

# ps aux | grep ntpd
# pgrep -l ntpd

Description of the above commands:
ps – displays information about a selection of the active processes.
pgrep – looks through the currently running processes and lists the process IDs which matches the selection criteria to stdout.

Leave a Reply

Your email address will not be published.