RHCSA Practical Lab Series – Configuring NTP Synchronization

Expertise in Cloud, Networking & DevOps
Photo by fabio / Unsplash

πŸ” Lab 7: Setting Up an NTP Client Using Chrony

πŸ“Œ Objective

In this lab, you will:

βœ” Install and configure Chrony as an NTP client
βœ” Sync time with an NTP server (ntp.cloudnetops.tech)
βœ” Verify time synchronization


πŸ“Œ Step 1: Install Chrony

πŸ”Ή Ensure chrony is installed on your system:

[root@node1 ~]# yum -y install chrony

πŸ“Œ Tip: Chrony is the recommended NTP client for modern RHEL-based systems.


πŸ“Œ Step 2: Configure the NTP Server

πŸ”Ή Edit the Chrony configuration file:

[root@node1 ~]# vim /etc/chrony.conf

πŸ”Ή Replace or add the following line in the configuration file:

server ntp.cloudnetops.tech iburst

πŸ“Œ Explanation:

  • server ntp.cloudnetops.tech iburst β†’ Sets ntp.cloudnetops.tech as the NTP server.
  • iburst β†’ Speeds up synchronization when the client first connects.

πŸ“Œ Step 3: Restart and Enable Chrony Service

πŸ”Ή Restart the Chrony service to apply the changes:

[root@node1 ~]# systemctl restart chronyd

πŸ”Ή Enable Chrony to start on boot:

[root@node1 ~]# systemctl enable chronyd

πŸ“Œ Tip: Restarting the service is necessary after modifying chrony.conf.


πŸ“Œ Step 4: Verify Time Synchronization

πŸ”Ή Manually change the system date to simulate incorrect time:

[root@node1 ~]# date -s "1982-1-1"

πŸ”Ή Restart Chrony to resync the time:

[root@node1 ~]# systemctl restart chronyd

πŸ”Ή Wait 3-5 minutes, then check the updated system time:

[root@node1 ~]# date

βœ… If the system time is correct, NTP synchronization is working!

πŸ“Œ Troubleshooting:

List NTP sources and their offsets:

[root@node1 ~]# chronyc sources -v

Check Chrony’s synchronization status:

[root@node1 ~]# chronyc tracking

βœ… Final Summary

βœ” Installed Chrony and configured it as an NTP client
βœ” Configured ntp.cloudnetops.tech as the time source
βœ” Verified time synchronization and troubleshooting steps


πŸ“Œ Next Lab: Setting Up AutoFS for Network File System (NFS) Mounts

πŸ“© Subscribe for more RHCSA exam labs and hands-on tutorials! πŸš€

Read more