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:

service ntpd start

systemctl start ntpd

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

ntpdate -q

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

Be the first to comment

Leave a Reply

Your email address will not be published.