Chrony:
Install Chrony and Configure NTP server for time adjustment.
[1] Install chrony.
[root@localhost ~]# dnf install chrony -y
...
[root@localhost ~]# vi /etc/chrony.conf
...
# line 3: change servers for synchronization (replace to your timezone's one)
#pool 0.pool.ntp.org iburst
server ntp.nict.jp iburst
server ntp1.jst.mfeed.ad.jp iburst
...
# line 26: add the network range you allow to receive requests
allow 192.168.0.0/16
...
[root@localhost ~]# systemctl enable chronyd --now
[2] If Firewalld is running, allow NTP service. NTP uses 123/UDP.
[root@localhost ~]# firewall-cmd --permanent --add-service=ntp
success
[root@localhost ~]# firewall-cmd --reload
success
[3] Verify it works normally like follows.
[root@localhost ~]# chronyc sources
210 Number of sources = 2
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* ntp-b3.nict.go.jp 1 6 17 8 +12ms[ +39ms] +/- 185ms
^+ ntp1.jst.mfeed.ad.jp 2 6 17 9 -4983us[-4983us] +/- 240ms
Ntpd:
Install ntpd and Configure NTP server for time adjustment.
[1] Install ntpd.
[root@localhost ~]# dnf install ntp -y
...
[root@localhost ~]# vi /etc/ntp.conf
...
# line 20: add the network range you allow to receive requests
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
...
# line 24: change servers for synchronization (replace to your timezone's one)
#pool 0.pool.ntp.org iburst
server ntp.nict.jp iburst
server ntp1.jst.mfeed.ad.jp iburst
...
[root@localhost ~]# systemctl enable ntpd --now
[2] If Firewalld is running, allow NTP service. NTP uses 123/UDP.
[root@localhost ~]# firewall-cmd --permanent --add-service=ntp
success
[root@localhost ~]# firewall-cmd --reload
success
[3] Verify it works normally like follows.
[root@localhost ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp-a3.nict.go. .NICT. 1 u - 64 1 361.551 -36.227 19.931
ntp1.jst.mfeed. 133.243.236.17 2 u - 64 1 433.986 -47.536 52.065