2010年4月6日火曜日

NTPの設定

時刻合わせ用にntpを導入します。
ntpパッケージを入れる
cocoro:~# aptitude install ntp
入れ終わったらntp.confを編集
cocoro:~# vi /etc/ntp.conf
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
 ↓ コメント行にする
#statistics loopstats peerstats clockstats
#filegen loopstats file loopstats type day enable
#filegen peerstats file peerstats type day enable
#filegen clockstats file clockstats type day enable

server 0.debian.pool.ntp.org iburst dynamic
server 1.debian.pool.ntp.org iburst dynamic
server 2.debian.pool.ntp.org iburst dynamic
server 3.debian.pool.ntp.org iburst dynamic
 ↓ に変更
server -4 ntp.nict.jp
server -4 ntp.jst.mfeed.ad.jp


保存したら起動しなおします
cocoro:~# /etc/init.d/ntp restart
確認
cocoro:~# ntpq -p

0 件のコメント:

コメントを投稿