How to Setup NTP on CentOS 7

This is a quick start guide to set up NTP on Centos 7

 

1. Install NTP service

yum install ntp

 

2.  Start service

systemctl start ntpd

 

3.  Enable service

systemctl enable ntpd

 

4. Edit NTP configuration

vi /etc/ntp.conf

Edit values for "server" eg

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server uk.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst

 

5. Restart NTP

systemctl restart ntpd

 

6. Check all is working

ntpq -p

and

timedatectl