Thursday, 7 March 2019

How to install and configure Chrony/NTP Configuration

Chrony is available in default repository of Centos 7 and RHEL 7.
Step 1: Install the chrony package:

[root@linuxcnf ~]# yum install chrony –y

Step 2: On the NTP Server, configure the chronyd service configure file /etc/chrony.conf  to synchronize time from suitable public pool of NTP servers and set the allow directive to act as NTP server for the other devices:

[root@linuxcnf ~]# vi /etc/chrony.conf
server NTP_server_1
server NTP_server_2
server NTP_server_3
server NTP_server_4

Step 3: Start the chronyd service and configure it to start on a system reboot:

[root@linuxcnf ~]# systemctl start chronyd
[root@linuxcnf ~]# systemctl enable chronyd

Step 4: Verify that chronyd is accessing the correct time sources:

[root@linuxcnf ~]# chronyc -a sources
210 Number of sources = 2
MS Name/IP address         Stratum Poll Reach LastRx Last sample
^*                  2   6   377    53  +8399us[  +12ms] +/-   98ms
^? 2001:a98:11::40               0   6     0     -     +0ns[   +0ns] +/-    0ns
[root@linuxcnf ~]#

That’s it!!!

1 comment: