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
cronydservice.# systemctl stop chronyd; systemctl disable chronyd
-
Install the
ntppackage.# yum install ntp -y
-
Enable the
ntpdservice.# systemctl enable ntpd
- Open outbound UDP port
123in all applicable firewall and security services. - Open the
/etc/ntp.conffile 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
ntpdservice.# systemctl start ntpd
Additional resources
Chapter 19. Configuring NTP Using ntpd: 19.17. Configure NTP
Comments
0 comments
Article is closed for comments.