7. Deploy, Configure, and Maintain Systems
πRed Hat Certified System Administrator (RHCSA β EX200)
1. Why Time Synchronization Is Important
In an IT environment, many systems work together across a network. If each system has a different time, several problems can occur.
Examples in an IT environment include:
- Log files: Events recorded on servers must show the correct time for troubleshooting.
- Security services: Authentication systems depend on accurate time.
- Automation tasks: Scheduled jobs rely on the correct clock.
- Clustered systems: Systems coordinating tasks must share the same time.
Because of this, Linux systems use time synchronization services to automatically correct the system clock.
2. Time Synchronization Protocol
Linux systems synchronize time using the Network Time Protocol (NTP).
Network Time Protocol
NTP allows systems to synchronize their clocks with trusted time servers over the network.
How NTP Works
- A system sends a request to a time server.
- The server replies with the current accurate time.
- The client adjusts its clock gradually to match the server.
This process happens automatically and continuously to maintain accuracy.
3. Time Services Used in RHEL
In modern Red Hat systems, the main time synchronization service is:
- Chrony
Chrony is faster and more reliable than older NTP implementations. It works well even when network connectivity changes.
Chrony consists of two main components:
| Component | Description |
|---|---|
| chronyd | The daemon that runs in the background and synchronizes time |
| chronyc | Command-line tool used to monitor and control the service |
4. Installing Chrony
In most Red Hat Enterprise Linux systems, Chrony is installed by default.
You can install it manually if needed.
sudo dnf install chrony
5. Starting and Enabling the Time Service
The chronyd service must be running to synchronize time.
Start the service:
sudo systemctl start chronyd
Enable it to start automatically at boot:
sudo systemctl enable chronyd
Verify the status:
systemctl status chronyd
Expected result: the service should show active (running).
6. Chrony Configuration File
Chrony is configured using the following file:
/etc/chrony.conf
This file defines which time servers the system will use.
Example configuration:
server 0.pool.ntp.org iburst
server 1.pool.ntp.org iburst
Explanation
| Option | Meaning |
|---|---|
| server | Defines a time server |
| iburst | Speeds up the initial synchronization |
You can add multiple servers for better reliability.
Example:
server time1.example.net iburst
server time2.example.net iburst
7. Restart Chrony After Configuration Changes
Whenever the configuration file is modified, restart the service:
sudo systemctl restart chronyd
8. Verifying Time Synchronization
Several commands are used to verify that time synchronization is working.
8.1 Check Time Settings
Use:
timedatectl
Example output:
System clock synchronized: yes
NTP service: active
Important fields:
| Field | Meaning |
|---|---|
| Local time | Current system time |
| Universal time | UTC time |
| RTC time | Hardware clock |
| NTP service | Whether synchronization is active |
8.2 Check Chrony Sources
Use:
chronyc sources
This command displays the time servers currently used by the system.
Example output:
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* time-server.example 2 6 377 34 -12us[ -25us] +/- 50ms
Symbols meaning:
| Symbol | Meaning |
|---|---|
| * | Currently selected time source |
| + | Acceptable time source |
| – | Not currently used |
8.3 Check Synchronization Status
Command:
chronyc tracking
This shows detailed synchronization statistics including:
- reference server
- system time offset
- last synchronization
9. Managing Time Using timedatectl
The command timedatectl is used to manage time settings.
View Current Settings
timedatectl
Set Timezone
List available timezones:
timedatectl list-timezones
Set timezone:
sudo timedatectl set-timezone Asia/Dhaka
Enable NTP Synchronization
sudo timedatectl set-ntp true
Disable NTP:
sudo timedatectl set-ntp false
10. Hardware Clock vs System Clock
Linux systems maintain two clocks.
| Clock | Description |
|---|---|
| Hardware Clock (RTC) | Physical clock stored on the motherboard |
| System Clock | Clock used by the operating system |
Chrony synchronizes the system clock, and the system periodically updates the hardware clock.
11. Important Files and Components for the RHCSA Exam
Students should remember these key elements.
Services
| Service | Purpose |
|---|---|
| chronyd | Time synchronization daemon |
Commands
| Command | Purpose |
|---|---|
| timedatectl | Display and configure time |
| chronyc | Monitor chrony |
| systemctl | Manage the chronyd service |
Configuration Files
| File | Purpose |
|---|---|
| /etc/chrony.conf | Chrony configuration |
12. Typical RHCSA Exam Tasks
In the RHCSA exam, you may be required to:
- Install Chrony
- Start and enable the chronyd service
- Configure a time server
- Verify synchronization
- Set the correct timezone
- Ensure NTP synchronization is enabled
You must know the exact commands to complete these tasks quickly.
13. Example Complete Configuration Procedure
A typical configuration process might look like this.
1 Install chrony
sudo dnf install chrony
2 Edit configuration
sudo vi /etc/chrony.conf
Add server:
server time.example.com iburst
3 Enable and start the service
sudo systemctl enable --now chronyd
4 Verify synchronization
chronyc sources
timedatectl
14. Troubleshooting Time Synchronization
If synchronization is not working, check the following:
Service Status
systemctl status chronyd
Configuration File Errors
/etc/chrony.conf
Network Connectivity
Ensure the system can reach the configured time server.
Firewall Restrictions
NTP uses UDP port 123. Ensure it is not blocked.
15. Summary
For the RHCSA (EX200) exam, students must understand how Linux systems synchronize time using Chrony.
Key points to remember:
- Time synchronization uses Network Time Protocol
- Modern Red Hat systems use Chrony
- The service responsible is chronyd
- Configuration file is /etc/chrony.conf
- Important commands include timedatectl and chronyc
- Always verify synchronization after configuration
Correct time synchronization is essential for system logging, authentication systems, and network service coordination in enterprise Linux environments.
