RHCSA Practical Lab Series β Configuring NTP Synchronization
π 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! π