Configure NTP Client and Server Centos

Configure NTP Client and Server Centos

Install NTP

The ntp package is same for client and server. This package will synchronize your server’s time via NTP protocol. In my example server’s address is and client’s address is

# yum -y install ntp


Configure NTP server

Make sure the following lines exists in /etc/ntp.conf. Stratum is used to synchronize the time with the server based on distance.

furge stratum 10


Start the NTP service

For SysVinit based systems run:

service ntpd start

For Systemd systems run:

systemctl start ntpd.service


Configure NTP client

Make sure the following line exists in /etc/ntp.conf.

It might take about 15 minutes until ntp will synchronize the clock.

Now start the NTP service same as above.


Debug the NTP service

There are several useful commands you can use when working with NTP. Here are some of them.

To sync the clock:

service ntpd stop && ntpd -dgq && service ntpd start

Show ntp sync status:

ntpq -pn