ntp サーバーの設定メモ
- インストール
# yum -y install ntp
- 設定
# vi /etc/ntp.conf # デフォルトで全部拒否。 restrict default ignore # ローカルホストからは何でもあり。 restrict 127.0.0.1 # LANからは、問い合わせOKにする。 restrict 10.0.0.0 mask 255.255.0.0 nomodify notrap # 参照するサーバー。ありがたや。 server ntp.nasa.gov # 参照するntpサーバーがダウンした場合にローカルホストを参照する設定らしい。デフォルトのまま。 server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 # 時刻のズレを記録するファイルのパス。デフォルトのまま driftfile /var/lib/ntp/drift # LAN内での利用なので、認証は不要 authenticate no
- 自動起動の設定
# chkconfig ntpd on <− 自動起動。 # service ntpd start <− その場で起動。