How to configure NTP server
How to Install NTP Using Chrony in RHEL 8
NTP (Network Time Protocol) is a protocol which runs over port
123 UDP. NTP synchronize clients time and date with a master server. Chrony is
a default NTP client as well as an NTP server on Red Hat Enterprise Linux 8.
123 UDP. NTP synchronize clients time and date with a master server. Chrony is
a default NTP client as well as an NTP server on Red Hat Enterprise Linux 8.
Service name = chronyd
Install chrony on system
# dnf install chrony -y
# yum install chrony -y
Now start the chronyd service, enable it to auto start at system boot and verify the running status:
# systemctl start chronyd
# systemctl status chronyd
# systemctl enable chronyd
# vim /etc/chrony.conf
Now search for the “allow” configuration directive and uncomment it and set the network addresses from which the clients are allowed:
#allow 192.168.0.0/16
now save and exit
now save and exit
Restart the chronyd service
# systemctl restart chronyd
Now open NTP service in firewalld configuration to allows for incoming NTP requests:
# firewall-cmd --permanent --add-service=ntp
# firewall-cmd –reload
# firewall-cmd --permanent --remove-service=chrony
installing the chrony package on client side:
# yum install chrony
# systemctl start chronyd
# systemctl enable chronyd
# systemctl status chronyd
# vim /etc/chrony.conf
Now add the NTP server address
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
pool2.rhel.pool.ntp.org iburst
Server 192.168.56.12
# systemctl restart chronyd
Now run the following command to show the current time sources (NTP server) that chronyd is accessing client side .
# chronyc sources
# chronyc clients
Now your server is ready done.
Hi and thank you for the video/posts. I am wondering if/how to verify a NTP server has the correct time, say after a reboot, before it starts to push time out to the clients?
ReplyDelete