Chrony is the default NTP client / server software in Linux. In this article, you will learn how to install chrony on CentOS 8. #centlinux #linux #ntp
Network Time Protocol (NTP) is a networking protocol used to synchronize the clocks of computers and devices over a network. It ensures that the time across all systems in a network is accurate and consistent. Here are some key points about NTP:
Overall, NTP plays a fundamental role in ensuring that the time is synchronized across all devices in a network, which is essential for reliable and secure operations.
An NTP server is a networked device that uses the Network Time Protocol (NTP) to provide precise time information to other devices within a network. It acts as a reference point for the accurate time and enables clients to synchronize their clocks. Here are the key aspects of an NTP server:
Overall, an NTP server is essential for maintaining consistent and accurate time across devices in a network, ensuring synchronized operations, and supporting time-sensitive applications.
Recommended Online Training: Learn Bash Shell in Linux for Beginners
Chrony and NTP (Network Time Protocol) are both tools used for time synchronization in computer networks, but they have some differences in terms of features, performance, and use cases. Here’s a comparison:
Both tools can achieve highly accurate time synchronization, but Chrony offers advantages in modern and dynamic environments where conditions are less predictable. Choosing between the two depends on your specific use case and network conditions.
Read Also: Setup Chrony NTP Server on Rocky Linux 8
We are using a minimal CentOS 8 virtual machine with following specifications.
By using a SSH client, connect with ntp-server.centlinux.com as root user.
By default, Chrony works as a NTP client and synchronize the clock of your Linux server with network time servers or network time peers.
You can enable Chrony NTP service to make it a full fledge network time server / peer.
First of all, you need to install Chrony software package on your Linux operating system.
Execute dnf command to install chrony software package..
# dnf install -y chrony
Enable and start chronyd service.
# systemctl enable --now chronyd.service
The NTP client is started with default configurations and synchronizing your Linux server clock with available network time servers / peers.
To get a list of available network time servers / peers, we can execute following Linux command.
# chronyc sources -v 210 Number of sources = 4 .-- Source mode '^' = server, '=' = peer, '#' = local clock. / .- Source state '*' = current synced, '+' = combined , '-' = not combined, | / '?' = unreachable, 'x' = time may be in error, '~' = time too variable. || .- xxxx [ yyyy ] +/- zzzz || Reachability register (octal) -. | xxxx = adjusted offset, || Log2(Polling interval) --. | | yyyy = measured offset, || | | zzzz = estimated error. || | | MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^* time.cloudflare.com 3 6 17 54 +6607us[ -33ms] +/- 104ms ^- 119.159.246.253 2 6 17 53 +30ms[ +30ms] +/- 102ms ^? time.cloudflare.com 0 6 0 - +0ns[ +0ns] +/- 0ns ^+ cdns-khi-02.ptcl.net.pk 2 6 17 54 +12ms[ +12ms] +/- 113ms
Check the CentOS / Red Hat Linux server time.
# date Sun Oct 11 22:16:26 PKT 2020
To configure your NTP server, you will need to allow your network address in Chrony configuration file.
# vi /etc/chrony.conf
Search for the “allow” directives and add following line beneath it.
allow 192.168.116.0/24
Restart chronyd NTP service to apply changes.
# systemctl restart chronyd.service
Verify that the chronyd service is listening on the default NTP port.
# ss -tulpn | grep 123 udp UNCONN 0 0 0.0.0.0:123 0.0.0.0:* users:(("chronyd",pid=10011,fd=9))
The Chrony NTP service is running fine. To make it usable by the network clients, you are only required to allow incoming traffic to this port through Linux firewall.
Firewalld is the default firewall software in CentOS 8. It has a predefined service for NTP service ports. Therefore, to allow incoming traffic, you are only required to enable NTP service in Linux firewall as follows.
# firewall-cmd --permanent --add-service=ntp success # firewall-cmd --reload success
Your Chrony based NTP server has been configured successfully and ready to use.
If you are new to Linux and facing difficulty in working at Linux Bash prompt. We recommend that, you should read The Linux Command Line, 2nd Edition: A Complete Introduction by William Shotts.
Installing a Chrony server on CentOS 8 is an excellent choice for ensuring precise and reliable time synchronization across your network. Chrony offers several advantages, including fast synchronization, robustness in dynamic environments, and efficient resource usage, making it suitable for both traditional servers and modern, mobile, or virtualized systems.
If you need detailed instructions or personalized assistance with installing and configuring a Chrony server on CentOS 8, I offer professional services to guide you through the process. Check out my Fiverr gig for expert help:
Fiverr Gig: Linux Server Configuration
Achieve accurate time synchronization with ease by leveraging my expertise!
Puppy Linux is a fast, lightweight OS designed for speed and simplicity, perfect for old…
Learn how to change Apache document root in Linux by following this step-by-step guide. Adjust…
Discover how to change Apache port in Linux easily. Follow our simple guide to modify…
Learn how to create a virtual host in Apache Server with this comprehensive guide. Set…
Discover 10 practical tasks for the RHCSA exam with step-by-step solutions. Boost your Linux skills…
Discover the ultimate Fail2ban configuration guide. Learn how to set up, customize, and optimize Fail2ban…
This website uses cookies.