How To Install chrony on CentOS 7
Introduction
In this tutorial we learn how to install chrony
on CentOS 7.
What is chrony
A client/server for the Network Time Protocol, this program keeps your computer’s clock accurate. It was specially designed to support systems with intermittent internet connections, but it also works well in permanently connected environments. It can use also hardware reference clocks, system real-time clock or manual input as time references.
We can use yum
or dnf
to install chrony
on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install chrony.
Install chrony on CentOS 7 Using yum
Update yum database with yum
using the following command.
sudo yum makecache
After updating yum database, We can install chrony
using yum
by running the following command:
sudo yum -y install chrony
Install chrony on CentOS 7 Using dnf
If you don’t have dnf installed you can install DNF on CentOS 7 first.
Update yum database with dnf
using the following command.
sudo dnf makecache
After updating yum database, We can install chrony
using dnf
by running the following command:
sudo dnf -y install chrony
How To Uninstall chrony on CentOS 7
To uninstall only the chrony
package we can use the following command:
sudo dnf remove chrony
References
Summary
In this tutorial we learn how to install chrony
on CentOS 7 using yum
and dnf
.