Configure NTP Client

NTP Client's settings in Future OS are mostly the same as server settings. Look at the ntpd or chrony settings. Clients do not need to receive time synchronization requests from other computers or set access permissions.

[1] Install ntpdate.

[[email protected] ~]# dnf install ntpdate -y

[2] If you are not using the NTP service and are using a command to synchronize the time all at once, use ntpdate as follows.

[[email protected] ~]# ntpdate ntp.nict.jp   # change the NTP server to your own time zone
28 Sep 01:51:40 ntpdate[434]: adjust time server 133.243.238.163 offset -0.001674 sec

[3] If you want automatic synchronization with the NTP service, first add the server for your time zone in the file below.

[[email protected] ~]# vi /etc/ntp/step-tickers
 # List of NTP servers used by the ntpdate service.

0.pool.ntp.org     # replace this line with your region's NTP server.

[4] Enable the ntpdate service to run at startup. It always runs once when the system starts.

[[email protected] ~]# systemctl enable ntpdate

[5] Timedatectl sets the time information received with ntpdate for your computer or server. Check the current time and whether the NTP service is active.

[[email protected] ~]# timedatectl
               Local time: Mon 2021-09-27 19:04:43 EDT
           Universal time: Mon 2021-09-27 23:04:43 UTC
                 RTC time: Mon 2021-09-27 23:04:43
                Time zone: US/Eastern (EDT, -0400)
System clock synchronized: no
              NTP service: inactive       # NTP service is not used.
          RTC in local TZ: no

[6] Activate automatic time adjustment with NTP.

[[email protected] ~]# timedatectl set-ntp true
[[email protected] ~]# timedatectl
               Local time: Mon 2021-09-27 19:05:15 EDT
           Universal time: Mon 2021-09-27 23:05:15 UTC
                 RTC time: Mon 2021-09-27 23:05:15
                Time zone: US/Eastern (EDT, -0400)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no