・Chrony のインストール
CentOS7 より時刻(NTP)サーバーが変更になり Chrony になった
CentOS の一般的なインストールでは標準でインストールされるが最小インストール等ではインストールされないのでインストールする
[root@centos]# dnf -y install chrony
・ntp の設定
[root@centos]# vi /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
pool 2.centos.pool.ntp.org iburst
↓※書き換え
pool ntp.nict.jp iburst※独立行政法人 情報通信研究機構のNTPサーバーに変更(日本標準時)
# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift
# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3
# Enable kernel synchronization of the real-time clock (RTC).
rtcsync
# Enable hardware timestamping on all interfaces that support it.
#hwtimestamp *
# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2
# Allow NTP client access from local network.
#allow 192.168.0.0/16
↓※コメントを解除して書き換え LAN 内からの時刻同期を許可
allow 192.168.1.0/24
≪ 以下省略 ≫
・ntp の起動
[root@centos]# systemctl start chronyd
・ntpd の自動起動設定
[root@centos]# systemctl enable chronyd
・自動起動設定の確認
[root@centos]# systemctl is-enabled chronyd
enabledenabled になっていればOK