• Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
logo logo
  • Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
ENEN
  • 简体简体
  • 繁體繁體
Client Area

CentOS 9 Time Synchronization Setup Guide

July 26, 2025

On CentOS 9, setting up time synchronization is typically done using the **chronyd** service, which is the default time synchronization daemon. Here’s a step-by-step guide:

### 1. Install chrony (if not already installed)
“`bash
sudo dnf install chrony
“`

### 2. Enable and start the chronyd service
“`bash
sudo systemctl enable –now chronyd
“`

### 3. Verify service status
“`bash
sudo systemctl status chronyd
# Should show “active (running)”
“`

### 4. Configure NTP servers (optional)
Edit the configuration file:
“`bash
sudo vi /etc/chrony.conf
“`
Add/replace server lines (e.g., using Alibaba Cloud NTP servers):
“`conf
server ntp.aliyun.com iburst
server ntp1.aliyun.com iburst
“`
Save and exit (`:wq` in vi).

### 5. Restart chronyd to apply changes
“`bash
sudo systemctl restart chronyd
“`

### 6. Check synchronization status
“`bash
chronyc tracking
# Look for “Leap status” and “System time”
chronyc sources -v
# Shows all configured NTP sources
“`

### 7. Set the timezone
“`bash
# List available timezones:
timedatectl list-timezones

# Set timezone (e.g., Shanghai):
sudo timedatectl set-timezone Asia/Shanghai
“`

### 8. Enable NTP synchronization
“`bash
sudo timedatectl set-ntp yes
“`

### 9. Verify time configuration
“`bash
timedatectl
“`
Check that:
– `NTP service: active`
– `System clock synchronized: yes`
– Correct timezone shows

### 10. Force immediate synchronization (if needed)
“`bash
sudo chronyc -a makestep
“`

### Troubleshooting Tips:
1. **Firewall configuration** (allow NTP traffic):
“`bash
sudo firewall-cmd –add-service=ntp –permanent
sudo firewall-cmd –reload
“`

2. **Check detailed logs**:
“`bash
journalctl -u chronyd
“`

3. **Test connectivity to NTP servers**:
“`bash
chronyc -N server ntp.aliyun.com iburst
“`

4. **Reset chrony statistics** if needed:
“`bash
sudo chronyc -a online
“`

> **Note**: CentOS 9 uses chrony by default. For legacy systems, you could use `ntpd`, but chrony is recommended for better performance, especially on systems with intermittent network connections.

Recent Posts

  • How to Configure FirewallD in CentOS Stream: From Essential to Production-Grade
  • Installing Docker on CentOS: A Practical Setup Guide (CentOS Stream 9/10 – 2026)
  • How to Secure a CentOS Server: 15 Essential Hardening Techniques (CentOS Stream 9/10 – 2026)
  • CentOS End of Life (EOL): What It Means and Migration Options in 2026
  • How to Configure a LAMP Stack on CentOS Stream for Production

Recent Comments

No comments to show.

Knowledge Base

Access detailed guides, tutorials, and resources.

Live Chat

Get instant help 24/7 from our support team.

Send Ticket

Our team typically responds within 10 minutes.

logo
Alipay Cc-paypal Cc-stripe Cc-visa Cc-mastercard Bitcoin
Cloud VPS
  • Hong Kong VPS
  • US VPS
Dedicated Servers
  • Hong Kong Servers
  • US Servers
  • Singapore Servers
  • Japan Servers
More
  • Contact Us
  • Blog
  • Legal
© 2026 Server.HK | Hosting Limited, Hong Kong | Company Registration No. 77008912
Telegram
Telegram @ServerHKBot