How to sync date time using Crony on CentOS 9 Stream / RHEL 9
On CentOS 7, to sync date time we often use NTPD. But on CentOS 9, there is no NTPD from CentOS.
chrony and ntpd are two different implementations of the Network Time Protocol (NTP).
chrony is a newer implementation, work well in a wider range of conditions. It can usually synchronise the system clock faster and with better time accuracy. It has many features, but it does not implement some of the less useful NTP modes like broadcast client or multicast server/client.
If your computer is connected to the Internet only for few minutes at a time, the network connection is often congested, you turn your computer off or suspend it frequently, the clock is not very stable (e.g. there are rapid changes in the temperature or it is a virtual machine), or you want to use NTP on an isolated network with no hardware reference clocks in sight, chrony will probably work better for you.
You can read more about Crony on Crony documentation.
By default, chronyd does not operate as an NTP server. We need to add an allow directive to the chrony.conf file in order for chronyd to open the server NTP port and respond to client requests. For example as NTP server for internal network 192.168.1.0/24.
allow 192.168.1.0/24
Installing Crony on CentOS 9 / RHEL 9
To Install Chrony use the command below:
dnf install chrony
Then you can check Pool Server on /etc/chrony.conf



