Configure NTP Server

Chrony:

Install Chrony and Configure NTP server for time adjustment.

[1] Install chrony.

[[email protected] ~]# dnf install chrony -y
...
[[email protected] ~]# 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
...
[[email protected] ~]# systemctl enable chronyd --now

[2] If Firewalld is running, allow NTP service. NTP uses 123/UDP.

[[email protected] ~]# firewall-cmd --permanent --add-service=ntp
success
[[email protected] ~]# firewall-cmd --reload
success

[3] Verify it works normally like follows.

[[email protected] ~]# 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.

[[email protected] ~]# dnf install ntp -y
...
[[email protected] ~]# 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
...
[[email protected] ~]# systemctl enable ntpd --now

[2] If Firewalld is running, allow NTP service. NTP uses 123/UDP.

[[email protected] ~]# firewall-cmd --permanent --add-service=ntp
success
[[email protected] ~]# firewall-cmd --reload
success

[3] Verify it works normally like follows.

[[email protected] ~]# 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