LoginSignup
0
1

More than 5 years have passed since last update.

Chronyの時刻自動同期設定

Last updated at Posted at 2018-05-22

設定忘れてたのでメモ

手順

  1. /etc/chrony.confファイルを編集する

    # cp -a /etc/chrony.conf /etc/chrony.conf.org.`date +%F` && vi /etc/chrony.conf
    
    chrony.conf
    # Use public servers from the pool.ntp.org project.
    # Please consider joining the pool (http://www.pool.ntp.org/join.html).
    server ntp.nict.jp iburst
    server ntp1.jst.mfeed.ad.jp iburst
    server ntp2.jst.mfeed.ad.jp iburst
    server ntp3.jst.mfeed.ad.jp iburst
    
  2. chronyd を再起動する

    # systemctl restart chronyd
    

確認

次のコマンドを実行する。

# chronyc sources

実行結果

210 Number of sources = 4
MS Name/IP address         Stratum Poll Reach LastRx Last sample              
===============================================================================
^* ntp-b3.nict.go.jp             1   6    17     2   +465us[+3554us] +/- 6620us
^- ntp1.jst.mfeed.ad.jp          2   6    17     3  -3926us[ -837us] +/-   82ms
^- ntp2.jst.mfeed.ad.jp          2   6    17     2  -4467us[-4467us] +/-   81ms
^- ntp3.jst.mfeed.ad.jp          2   6    17     2  -3844us[-3844us] +/-  119ms
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1