Configuring NTP (Network Time Protocol) on Linux

Modified on Thu, 5 Feb at 10:40 PM

TABLE OF CONTENTS


Overview

NTP is a protocol that runs over UDP port 123 and allows the OTM server to synchronize time over networks for accurate timekeeping.


Configuring NTP on OTM Server

Follow the steps below to configure NTP on the OTM Server. Use the correct IP of the OTM Server.

  1. Verify that the NTP server package is installed:
    systemctl status ntpd
  2. If the NTP package is not installed (older releases), install it:
    yum -y install ntp
  3. Start the NTP daemon:
    systemctl start ntpd
  4. Enable NTP to start automatically at boot:
    systemctl enable ntpd
  5. Check NTP service status:
    systemctl status ntpd

Verification

After starting NTP, wait a few minutes for the OTM server to synchronize with the configured NTP servers.

  • Check synchronization status:
    ntpq -p
  • Display OTM server date:
    date -R


Optional NTP Configuration

By default, NTP uses CentOS public time servers. If you prefer to use public time servers closer to the physical location of the OTM server, follow the steps below.

  1. Visit the official NTP Public Time Servers website.
  2. Select public time servers geographically close to the OTM server.
  3. Edit the NTP configuration file (/etc/ntp.conf) using root privileges and add your selected time pool servers.

Example: Public time servers selected from http://www.pool.ntp.org/zone/us:

server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article