Introduction
This article provides the steps to configure the NTP daemon to keep a RHEL 7-based server's time accurate.
Procedure
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Stop and disable the
cronyd
service.systemctl stop chronyd; systemctl disable chronyd
- Install the
ntp
package.yum install ntp -y
- Enable the
ntpd
service.systemctl enable ntpd
- Open outbound UDP port
123
in all applicable firewall and security services. - Open the
/etc/ntp.conf
file in your preferred text editor. - Comment out the existing server lines.
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst - Add a new server line for the hostname of the NTP server to query.
server time.google.com
- Save the changes and exit the text editor.
- Start the
ntpd
service.systemctl start ntpd
Additional resources
Chapter 19. Configuring NTP Using ntpd: 19.17. Configure NTP
Comments
0 comments
Article is closed for comments.