How To Install NTP (Chrony) On CentOS 8 / CentOS 7 & RHEL 8 / RHEL 7 Jun 1, 2020 Raj 3 min read CONTENTS Install Chrony On CentOS 8 / CentOS 7 & RHEL 8 / RHEL 7 Configure NTP Server Using Chrony Configure NTP Client Using Chrony Conclusion SHARE The Network Time Protocol (NTP) is a networking protocol for system clock synchronization with remote internet time servers or other sources such as GPS or radio clocks. Accurate timekeeping is crucial in servers for application to work correctly or troubleshooting issues with the help of logs time stamp. Chrony is an implementation of NTP, and it is a replacement for the old Ntpd used in previous versions of enterprise Linux operating systems. Here, we will see how to install NTP (Chrony) On CentOS 8 / CentOS 7 & RHEL 8 / RHEL 7. Chrony works as the default NTP server and client on CentOS 8 / RHEL 8. In CentOS 7/ RHEL 7, you have an option to choose either NTP or Chrony as an NTP daemon. Install Chrony On CentOS 8 / CentOS 7 & RHEL 8 / RHEL 7 There are chances your server already has Chrony installed and configured as a client to use remote clock server(s). yum install -y chrony Install Chrony Package Configure NTP Server Using Chrony In this section, we will configure the servers as an NTP server, which will act as a remote time server for all clients in your organization. vi /etc/chrony.conf Change the subnet value of allow directive as per your requirement to allow the clients from your organization network. In my case, clients who have IP addresses from 192.168.0.1 to 192.168.0.254 are allowed to connect to the NTP server for time synchronization. allow 192.168.0.0/24 Restart the Chrony service to apply the configuration change. systemctl restart chronyd Enable Chrony service on system startup. systemctl enable chronyd Add the firewall rules to allow NTP requests from clients. firewall-cmd --permanent --add-service=ntp firewall-cmd --reload Once you have configured the NTP server, go to the client machine and add this server as an NTP server. Then, run the below command to check how many clients are accessing the NTP server. chronyc clients NTP Clients Configure NTP Client Using Chrony Install the Chrony package if the package is not already installed. yum install -y chrony Now, we will configure this machine as an NTP client, which will reach the NTP server we configured earlier for time synchronization. vi /etc/chrony.conf Comment out the existing server directives and add a new server directive for our NTP server. server 192.168.0.10 NTP Server Then, restart the Chrony service. systemctl restart chronyd Enable Chrony service on system startup. systemctl enable chronyd Check the time source to ensure the client is reaching to correct NTP server. chronyc sources Output: 210 Number of sources = 1 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^? 192.168.0.10 3 6 1 25 +2525us[+2525us] +/- 87ms Time Source By default, NTP client will perform a time synchronization every 64 seconds. However, you can adjust the clock manually without waiting for the next time sync polling. chronyc makestep Conclusion That’s All. Please share your feedback in the comments section. centos-8 centos-7 ntp Prev Post How To Install VirtualBox On Ubuntu 20.04 Next Post How To Install Puppet On CentOS 8 / RHEL 8 RELATED POSTS How To Install Gradle on CentOS 8 / 7 & RHEL 8 / 7 How To Setup High Availability Cluster on CentOS 8 / RHEL 8 How To Setup Icinga Web 2 on CentOS 8 / RHEL 8 How To Install KVM on CentOS 8 / RHEL 8 How To Install Cockpit on CentOS 8 / RHEL 8 How To Install Icinga 2 on CentOS 8 / RHEL 8 Please enable JavaScript to view the comments powered by Disqus. comments powered by Disqus RECENT POSTS How To Install VirtualBox On Linux Mint 20 How To Backup and Restore Ubuntu & Linux Mint With Timeshift How To Upgrade To Linux Mint 20 From Linux Mint 19 [Detailed Guide] How To Install KVM On Ubuntu 20.04 / Linux Mint 20 How To Install Plex Media Server On Ubuntu 20.04 / Linux Mint 20 How To Install Android Studio on Ubuntu 20.04 TOP POSTS Install xrdp on CentOS 7 / RHEL 7 Install Gnome GUI on CentOS 7 / RHEL 7 Change default network name (ens33) to old “eth0” on Ubuntu… Install μTorrent (uTorrent) on Ubuntu 14.04 How To Configure High-Availability Cluster on CentOS 7 /… How To Install and Configure VNC Server in CentOS 7 / RHEL 7