Sunday, 24 November 2019

How to Configure Chrony Time Synchronization Server on CentOS 8




Chrony is a Time Synchronization server introduced in CentOS7. It is a free and open source widely used software for time synchronization between centralized Time Server and clients over the network. Chrony rpm package and its dependencies are available in CentOS8 base repository.

This article describes How to install and Configure Chrony Time Server on CentOS8.
.
Step 1. Packages Installation: Run the following command to installation Chrony package and its dependencies using yum package manager tool:

[root@linuxcnf ~]# dnf install chrony –y
…………………..
Installed:
  chrony-3.3-3.el8.x86_64                                                           timedatex-0.5-3.el8.x86_64

Complete!
[root@linuxcnf ~]#

Step 2. Configure Time Synchronization Pools: Edit configuration file /etc/chrony.conf and put public or internet service provider time synchronization server address:

[root@linuxcnf ~]# vi /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
pool 2.centos.pool.ntp.org iburst
……………………
[root@linuxcnf ~]#

Step 3. Restrictions: Edit the following parameter in chrony configuration file to allow selected networks for time synchronization:

[root@linuxcnf ~]# vi /etc/chrony.conf
…………………....
# Allow NTP client access from local network.
allow 192.168.43.0/24
…………………….
[root@linuxcnf ~]#

Step 4. Start Service: Run the following commands to start chrony service and auto start on across the machine reboot:

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

Step 5. Firewall Configuration: Run the following command to allow access in firewall for chrony time synchronization:

[root@linuxcnf ~]# firewall-cmd --permanent --add-port=123/tcp
success
[root@linuxcnf ~]# firewall-cmd --reload
success
[root@linuxcnf ~]#

Step 6 Verify Installation: Run the following command to verify chrony time synchronization server installation:

[root@linuxcnf ~]# chronyc sources
210 Number of sources = 4
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===================================================
^* 162.159.200.123               3   8   377    99  -2789us[-3952us] +/-   77ms
^- a.ams.pobot.net               2   7    66   302  -2198us[-1975us] +/-   95ms
^- blr-live.netgen.in            2   8   377   105    -62ms[  -62ms] +/-  213ms
^? 2602:fe90:300:1a2::b954:>     0   8     0     -     +0ns[   +0ns] +/-    0ns
[root@linuxcnf ~]#

Done!!! Chrony Time Synchronization Server configuration has been done.

No comments:

Post a comment