りんちゃんの日記

日常を書き留めていきます。

08_時刻合わせ

OSの時計を合わせる

1. ntpサーバインストール

   # yum -y install ntpd


2. config編集(デフォルトでも問題無し)

 2.1. 下記3行をコメントアウトする

    # vi /etc/ntp.conf
      # server 0.centos.pool.ntp.org <-- コメントアウト
      # server 1.centos.pool.ntp.org <-- コメントアウト
      # server 2.centos.pool.ntp.org <-- コメントアウト


3. ntpサーバの自動起動と確認

 3.1. 自動起動

    # chkconfig ntpd on

   3.2. 自動起動(3、4、5が「on」になっていればOK)

   # chkconfig --list ntpd
   
ntpd  0:off  1:off  2:on  3:on  4:on  5:on  6:off