2017年3月30日木曜日

CentOS7でNTP設定

# yum -y install chrony
chrony-2.1.1-4.el7.centos.x86_64

# vi /etc/chrony.conf

#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 192.168.25.111 iburst
port 0
makestep 1.0 3                                 # 10 3になっていないかを確認。

※ port 0 は、クラアイントとして動作、(port 123のListenをしない)
※ makestep 1.0.3  一秒以上の差が3回続いたら、stepモードで調整。(通常はslewモード)


NTPD停止
# systemctl stop ntpd
# systemctl disable ntpd

Chronyd起動
# systemctl enable chronyd
# systemctl restart chronyd

時刻同期確認
# chronyc sources
#  chronyc tracking

手動で同期
# chronyc -a makestep

0 件のコメント:

コメントを投稿

シャットダウン時の後処理 (shutdown)

# vi /etc/systemd/system/drop.service [Unit] Description= stop httpgwd DefaultDependencies=no Before=shutdown.target RefuseManualStart=true ...