CentOS Stream 8
Sponsored Link

NTP : クライアントの設定2021/02/22

 
NTP クライアントの設定です。
[1] NTP サーバーの設定と大差ありませんが、NTP クライアントの場合は、他ホストからの時刻同期リクエストを受け付ける必要はないため、[allow ***] 行が不要になります。
[root@node01 ~]#
dnf -y install chrony
[root@node01 ~]#
vi /etc/chrony.conf
# 3行目 : 時刻同期する NTP サーバーを変更

#
pool 2.centos.pool.ntp.org iburst
pool dlp.srv.world iburst
[root@node01 ~]#
systemctl enable --now chronyd
# 動作確認

[root@node01 ~]#
chronyc sources

210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^* dlp.srv.world                 2   6     7     0   +141us[-2863us] +/- 8033us
[2] NTPStat をインストールすることで、時刻同期の状況を分かりやすく表示できます。
[root@node01 ~]#
dnf -y install ntpstat
[root@node01 ~]#
ntpstat

synchronised to NTP server (10.0.0.30) at stratum 3
   time correct to within 15 ms
   polling server every 64 s
関連コンテンツ