Linux

CentOS – Configure NTP Client

You could just use the date command and set the linux clock to your kitchen-clock. But it’s better to use ntp.
The Network Time Protocol (NTP) is a protocol that is used to synchronize computer clock times in a network of computers.

Your CentOS installation probably already has the ntp package. If not, install it.
# yum install ntp

Make sure the ntp service starts at boot.
# chkconfig ntpd on

Go to this site Global — pool.ntp.org, click your continent and find your country.
Copy the server lines. Example, for the Netherlands:
nl.pool.ntp.org

Now edit the /etc/ntp.cfg file and replace the
server 0.centos.pool.ntp.org
server 1.centos.pool.ntp.org
server 2.centos.pool.ntp.org

with the lines you just copied:
server 0.nl.pool.ntp.org
server 1.nl.pool.ntp.org
server 2.nl.pool.ntp.org
server 3.nl.pool.ntp.org

Set the time
# ntpdate 0.nl.pool.ntp.org

Start ntp service
# service ntpd restart

Your clock is kept in sync :)

Leave a Reply


}) _0- O-) ;) ;( :{ :o :Y :X :P :N :D :@ :? :9~ :) :(