Friday, September 27, 2019

CentOS/RHEL: Configuring NTP time synchronization using the CHRONY utility

Run to install chrony:

dnf install chrony
systemctl enable chronyd
systemctl start chronyd

Configure as NTP server:

1. Edit file "/etc/chrony.conf". Uncomment and configure the parameter "allow 192.168.1.0/24", which gives permission to synchronize time with the NTP server to your subnets.
2. Configure firewall:

firewall-cmd --permanent --add-service=ntp
firewall-cmd --reload

3. Restart chrony:

systemctl restart chronyd

4. Run to check if clients are connecting to the NTP service:

chronyc clients

Configure as NTP client:

1. Edit file "/etc/chrony.conf". Add the parameter "server 192.168.1.2", where ip address is the NTP server.
2. Restart chrony:

systemctl restart chronyd

3. Run to check if your host is connecting to an NTP server:

chronyc sources

No comments:

Post a Comment