vi /etc/chrony.conf
Here, we will see how to install NTP (Chrony) On CentOS 8 / CentOS 7 & RHEL 8 / RHEL 7.
chronyc clients
Configure NTP Client Using Chrony
Contents
Chrony is an implementation of NTP, and it is a replacement for the old Ntpd used in previous versions of enterprise Linux operating systems.
Install Chrony On CentOS 8 / CentOS 7 & RHEL 8 / RHEL 7
chronyc makestep
Conclusion
systemctl restart chronyd
systemctl enable chronyd
Chrony works as the default NTP server and client on CentOS 8 / RHEL 8. In CentOS 7/ RHEL 7, you have an option to choose either NTP or Chrony as an NTP daemon.
yum install -y chrony
Configure NTP Server Using Chrony
vi /etc/chrony.conf
server 192.168.0.10
firewall-cmd --permanent --add-service=ntp firewall-cmd --reload
Once you have configured the NTP server, go to the client machine and add this server as an NTP server.