$ su - # yum -y install chrony
NTPサーバーのIPアドレスを書き換えます。
# 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). #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 ntp.jst.mfeed.ad.jp iburst
設定が終わったら再起動。
# systemctl restart chronyd.service
動作確認。
# chronyc sources 210 Number of sources = 1 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^* ntp1.jst.mfeed.ad.jp 2 6 17 0 -233us[-3105us] +/- 86ms
自動起動サービスに登録。
# systemctl enable chronyd.service
# chronyc -a makestep
chrony を停止
# systemctl stop chronyd.service
日時の変更
# date --set='2018/03/01 00:00:00'
日付を戻す
# systemctl start chronyd.service; chronyc -a makestep