• WordPress
  • cPanel
  • Softaculous
  • KVM Virtualization
  • Vmware Virtualization
  • Proxmox
Saturday, June 14, 2025
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux
No Result
View All Result
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux

How to Set up NTP Server on Rocky Linux

in Linux OS, Red Hat Enterprise Linux, Rocky Linux
How to Set up NTP Server on Rocky Linux

Network Time Protocol (NTP) is used to synchronize the clocks of computers on a network. In this tutorial, we will learn how to set up an NTP server on Rocky Linux using the Chrony package, a modern alternative to the traditional NTP on Rocky Linux.

How to Set up NTP Server on Rocky Linux

Prerequisites

Before you begin, ensure that you have:

  1. A Rocky Linux system installed and updated.
  2. Root or sudo access to the system.

Install Chrony on Rocky Linux

To install Chrony, run the following command:

sudo dnf install -y chrony

Configure Chrony on Rocky Linux

Once Chrony is installed, you will need to configure it. Open the configuration file with a text editor like nano:

sudo nano /etc/chrony.conf

Look for the pool directive in the file, which specifies the NTP servers that Chrony will use for synchronization. By default, the configuration file uses public NTP servers. You can either leave the default settings or replace them with your preferred NTP servers.

For example, you can use the pool.ntp.org project’s time servers:

pool 0.rhel.pool.ntp.org iburst
pool 1.rhel.pool.ntp.org iburst
pool 2.rhel.pool.ntp.org iburst
pool 3.rhel.pool.ntp.org iburst

Save and exit the configuration file.

Start and Enable Chrony on Rocky Linux

Start the NTP service with the following command:

sudo systemctl enable chronyd

To enable the NTP service at boot, run:

sudo systemctl start chronyd

Allow NTP Through the Firewall on Rocky Linux

If you have the firewalld service running on your server, you will need to configure it to allow NTP traffic. Execute the following commands to allow NTP through the firewall:

sudo firewall-cmd --add-service=ntp --permanent
sudo firewall-cmd --reload
allow <IP_address>/<subnet_mask>
allow 192.168.1.0/24

Replace <IP_address> and <subnet_mask> with the appropriate values for your network. For example, to allow devices on the 192.168.1.0/24 network to synchronize their time:

Verify NTP Server Functionality

You can check the status of your NTP server by running the following command:

chronyc tracking

This command will display information about the current synchronization status, including the system time, last offset, and the reference ID of the NTP server being used.

Configure NTP Clients on Rocky Linux

Now that your NTP server is up and running, you can configure clients to synchronize time with it. Edit the /etc/ntp.conf file on each client and replace the existing server lines with the IP address or hostname of your NTP server:

server {your_ntp_server} iburst

Restart the NTP service on the clients to apply the changes:

sudo systemctl restart chronyd

That’s it! Your NTP server is now set up on Rocky Linux and ready to synchronize time with clients.

Conclusion

In this tutorial, we covered how to set up an NTP server on Rocky Linux and configure clients to synchronize with it. Keeping accurate time is essential for the proper functioning of many services and applications. Now that you have an NTP server running on your network, you can ensure that all devices maintain the correct time.

If you’re looking to further enhance your Rocky Linux server, check out these additional tutorials:

  • How to Install Bacula Backup Server on Rocky Linux, How to Install and Configure Rsync on Rocky Linux and How to Install SVN on Rocky Linux
ShareTweet
Previous Post

How to Install Bacula Backup Server on Rocky Linux

Next Post

How to Install Apache Tomcat on Rocky Linux

Related Posts

How to Install and Configure OpenVAS on Rocky Linux

How to Install and Configure OpenVAS on Rocky Linux

How to Install and Configure Nikto on Rocky Linux

How to Install and Configure Nikto on Rocky Linux

Set up FreeIPA on Rocky Linux

How to Install and Configure FreeIPA on Rocky Linux

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Golden Host VPS
  • Privacy Policy
  • Terms and Conditions
  • About Us
  • Contact Us

Copyright © 2023 linuxboost.com All Rights Reserved.

  • Privacy Policy
  • Terms and Conditions
  • About Us
  • Contact Us

Copyright © 2023 linuxboost.com All Rights Reserved.