How To Install chrony on Rocky Linux 8

In this tutorial we learn how to install chrony on Rocky Linux 8. chrony is An NTP client/server

Introduction

In this tutorial we learn how to install chrony on Rocky Linux 8.

What is chrony

chrony is a versatile implementation of the Network Time Protocol (NTP). It can synchronise the system clock with NTP servers, reference clocks (e.g. GPS receiver), and manual input using wristwatch and keyboard. It can also operate as an NTPv4 (RFC 5905) server and peer to provide a time service to other computers in the network.

We can use yum or dnf to install chrony on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install chrony.

Install chrony on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install chrony using dnf by running the following command:

sudo dnf -y install chrony

Install chrony on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install chrony using yum by running the following command:

sudo yum -y install chrony

How To Uninstall chrony on Rocky Linux 8

To uninstall only the chrony package we can use the following command:

sudo dnf remove chrony

chrony Package Contents on Rocky Linux 8

/etc/NetworkManager/dispatcher.d/20-chrony
/etc/chrony.conf
/etc/chrony.keys
/etc/dhcp/dhclient.d/chrony.sh
/etc/logrotate.d/chrony
/etc/sysconfig/chronyd
/usr/bin/chronyc
/usr/lib/.build-id
/usr/lib/.build-id/06
/usr/lib/.build-id/06/b2bef6ee15fd7b639a848938eae1ffe0bc7801
/usr/lib/.build-id/a8
/usr/lib/.build-id/a8/c3cf940cc44dacd2e310fd8ec9b8d277267f7c
/usr/lib/systemd/ntp-units.d/50-chronyd.list
/usr/lib/systemd/system/[email protected]
/usr/lib/systemd/system/[email protected]
/usr/lib/systemd/system/chrony-wait.service
/usr/lib/systemd/system/chronyd.service
/usr/libexec/chrony-helper
/usr/sbin/chronyd
/usr/share/doc/chrony
/usr/share/doc/chrony/FAQ
/usr/share/doc/chrony/NEWS
/usr/share/doc/chrony/README
/usr/share/doc/chrony/ntp2chrony.py
/usr/share/licenses/chrony
/usr/share/licenses/chrony/COPYING
/usr/share/man/man1/chronyc.1.gz
/usr/share/man/man5/chrony.conf.5.gz
/usr/share/man/man8/chronyd.8.gz
/var/lib/chrony
/var/lib/chrony/drift
/var/lib/chrony/rtc
/var/log/chrony

References

Summary

In this tutorial we learn how to install chrony on Rocky Linux 8 using yum and dnf.