3月 11, 2010 0
ntp設定
・設定ファイル修正
[root@centos ~]# vi /etc/ntp.conf restrict -6 default kod nomodify notrap nopeer noquery ↓ #restrict -6 default kod nomodify notrap nopeer noquery restrict -6 ::1 ↓ #restrict -6 ::1
※下記追加
・パターン1.
server -4 ntp.nict.jp iburst server -4 ntp.nict.jp iburst server -4 ntp.nict.jp iburst
※(同じ内容を3行書くのが重要)
なお、”-4″ は強制的に IPv4 を使用するためのオプションです。
もし、IPv6 で接続可能でしたら無くても構いません(その場合、IPv6 が優先される場合が多いと思います)。
また、”iburst” は起動時に多数ポーリングし、初期化時間を短縮します。
※関連情報:http://www2.nict.go.jp/w/w114/tsp/PubNtp/index.html
・パターン2.
server -4 ntp.nict.jp server -4 ntp.jst.mfeed.ad.jp server -4 プロバイダIP
※必要に応じて
restrict 0.rhel.pool.ntp.org mask 255.255.255.0 nomodify notrap noquery restrict 1.rhel.pool.ntp.org mask 255.255.255.0 nomodify notrap noquery restrict 2.rhel.pool.ntp.org mask 255.255.255.0 nomodify notrap noquery
・ntpサービス起動・自動起動設定
[root@centos ~]# /etc/init.d/ntpd start [root@centos ~]# ntpdate ntp.nict.jp [root@centos ~]# chkconfig ntpd on [root@centos ~]# chkconfig --list ntpd
※補足
restrictのパラメータ
ignore
指定したサーバからのすべてのNTPアクセスを無視する
noquery
指定したサーバからの時刻問い合わせパケットを無視する
nomodify
指定したサーバからの設定変更要求パケットを無視する。情報請求は許可する
notrust
通常の利用は許可する。時刻同期の情報源としては使用しない
nopeer
指定ホストと相互に同期しない
最近のコメント