Install and Setup NTP Client

Install the NTP package using yum:

yum install ntp

Once installation complete, edit /etc/ntp.conf to choose the servers you want to sync with. Use the default servers in the file if you do not have any NTP Server setup.

Start NTP as service to sync with remote host:

CENTOS 6
service ntpd start

CENTOS 7
systemctl start ntpd

To sync the time for the first time, run the below command:

ntpdate -q 0.centos.pool.ntp.org

you will see:
server 209.58.185.100, stratum 2, offset 0.010423, delay 0.02919
server 118.140.184.99, stratum 2, offset -0.003829, delay 0.02968
server 203.95.213.129, stratum 2, offset -0.014138, delay 0.02942
server 118.143.17.82, stratum 1, offset -0.004226, delay 0.04680
28 Mar 15:09:44 ntpdate[1343]: adjust time server 118.143.17.82 offset -0.004226 sec

Be the first to comment

Leave a Reply

Your email address will not be published.


*