Keep Time Synced on CentOS 7

Install NTP and NTP Date

If you haven't already got NTP and NTP Date installed, you'll need to do that first.

yum install -y ntp ntpdate

Preliminary Sync

We like to use the Canadian NTP servers, as we're based in Canada. If you're in the US, you can use us.pool.ntp.org. If you're anywhere else in the world, you can use the generic pool.ntp.org or check out the list of NTP serversĀ here

ntpdate ca.pool.ntp.org

Configure NTPd to use Local Servers

This step isn't necessary but I always like NTPd to be using relatively local servers.

Open up the ntpd config file and configure it with your local NTP servers.

nano /etc/ntp.conf
server 0.ca.pool.ntp.org iburst
server 1.ca.pool.ntp.org iburst
server 2.ca.pool.ntp.org iburst
server 3.ca.pool.ntp.org iburst

Make sure NTPd Starts on Boot

systemctl enable ntpd.service

Start NTPd

 systemctl start ntpd.service


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 5676