The Network Time Server maintains the system time in synchronization with time servers using the Network Time Protocol to provide accurate timing for server log records and other security-sensitive functions.  Chrony is best used on systems that are infrequently connected to the network, such as a laptop or desktop that is powered down often.


Install NTP and configure time server.

yum -y install chrony

Edit the NTP configuration file.  Disable CentOS NTP pools by remarking existing lines with # and configure to NTP server of your choice.  I've configured this to the NIST National Institute of Standards and Technology.

nano /etc/chrony.conf 

#server iburst
#server iburst
#server iburst
#server iburst
server iburst

Configure NTP server to automatically start on server reboot.

systemctl enable chronyd
systemctl start chronyd

Configure the firewall.  The time server protocol NTP uses 123/UDP.

firewall-cmd --add-service=ntp --permanent
firewall-cmd --reload

Loading Conversation