時刻同期のため、ntpをインストールします。
CentOS7 Minimal install PKGにはデフォルトで入っていないため、yumでインストールします。
# yum -y install ntp
# cp -p /etc/ntp.conf /etc/ntp.conf.org
# vi /etc/ntp.conf
=========================
~
# Hosts on local network are less restricted.(時刻同期する範囲を追記)
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict 192.168.136.0 mask 255.255.255.0 nomodify notrap
~
# Use public servers from the pool.ntp.org project.(時刻同期するサーバを変更)
# Please consider joining the pool (http://www.pool.ntp.org/join.html)
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server ntp1.jst.mfeed.ad.jp iburst
server ntp2.jst.mfeed.ad.jp iburst
server ntp3.jst.mfeed.ad.jp iburst
=========================
firewallを有効にしている場合は、下記コマンドで許可します。
# firewall-cmd --add-service=ntp --permanent
# firewall-cmd --reload
サービスを起動します。
# systemctl enable ntpd
# systemctl start ntpd
動作確認でNTP サーバーに照会し、下記の通り応答があれば、完了です。
# ntpq -p
remote refid st t when poll reach delay offset jitter ============================================================================== *ntp1.jst.mfeed. 133.243.236.17 2 u 2 64 1 12.072 9.546 0.690 +ntp2.jst.mfeed. 133.243.236.17 2 u 1 64 1 10.544 7.334 3.823 +ntp3.jst.mfeed. 133.243.236.17 2 u 2 64 1 12.787 5.177 2.119