Chrony のインストールと設定
[root@falcon21 ~]# dnf -y install chrony
メタデータの期限切れの最終確認: 6:19:33 時間前の 2020年11月18日 06時16分10秒 に実施しました。
パッケージ chrony-3.5-1.el8.x86_64 はすでにインストールされています。
依存関係が解決しました。
行うべきことはありません。
完了しました!
[root@falcon21 ~]# vi /etc/chrony.conf
1 # Use public servers from the pool.ntp.org project.
2 # Please consider joining the pool (http://www.pool.ntp.org/join.html).
3 #pool 2.centos.pool.ntp.org iburst
4 pool ntp.nict.jp iburst
5
6 # Record the rate at which the system clock gains/losses time.
7 driftfile /var/lib/chrony/drift
8
9 # Allow the system clock to be stepped in the first three updates
10 # if its offset is larger than 1 second.
11 makestep 1.0 3
12
13 # Enable kernel synchronization of the real-time clock (RTC).
14 rtcsync
15
16 # Enable hardware timestamping on all interfaces that support it.
17 #hwtimestamp *
18
19 # Increase the minimum number of selectable sources required to adjust
20 # the system clock.
21 #minsources 2
22
23 # Allow NTP client access from local network.
24 #allow 192.168.0.0/16
25 allow 192.168.10.0/24
26
27 # Serve time even if not synchronized to a time source.
28 #local stratum 10
29
30 # Specify file containing keys for NTP authentication.
31 keyfile /etc/chrony.keys
32
33 # Get TAI-UTC offset and leap seconds from the system tz database.
34 leapsectz right/UTC
35
36 # Specify directory for log files.
37 logdir /var/log/chrony
38
39 # Select which information is logged.
40 #log measurements statistics tracking
NTP chronyd 起動
[root@falcon21 ~]# systemctl start chronyd
[root@falcon21 ~]# systemctl enable chronyd
[root@falcon21 ~]# systemctl restart chronyd
[root@falcon21 ~]# systemctl status chronyd
● chronyd.service - NTP client/server
動作確認
[root@falcon21 ~]# chronyc sources
210 Number of sources = 4
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 2400:8500:1801:418:a118:> 2 10 377 132 -1052us[-1626us] +/- 11ms
^- 2409:10:2540:300:f64d:30> 2 10 377 450 -1048us[-1553us] +/- 55ms
^- 2606:4700:f1::123 3 10 377 547 +3877us[+3392us] +/- 62ms
^- 2001:418:3ff::53 2 10 377 532 +726us[ +238us] +/- 73ms