Wiki内検索
最新コメント
sshサーバの設定 by stunning seo guys
bind9(chroot)の設定 by check it out
FrontPage by seo thing
speedstepの設定 by tips about seo
sshサーバの設定 by check this out
postfixの設定 by watch for this
最近更新したページ
タグ
フリーエリア

ntpサーバの設定

はじめに

このページではntpサーバーの設定を行い、自動で時刻あわせができるようにします。

ntpサーバのインストール

$ sudo apt-get update
$ sudo apt-get install ntp
インストールすれば、linuxを起動したときに自動で立ち上がるようになります。

ntpサーバの設定例

$ sudo vim /etc/ntp.conf
以下の部分を書き換えます。
server ntp.nict.jp
server ntp.nict.jp
server ntp.nict.jp
サーバは基本的にプロバイダのサーバを設定します。
プロバイダが提供していない場合は推奨公開サーバから選んでください。

ローカルからも参照する場合は、以下も設定します。
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap

設定を適用します。
$ sudo invoke-rc.d ntp restart

動作確認


$ ntpq -p
出力例:
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*ring.xxxx.xx.jp xxx.xxx.xxx.xxx  2 u    7   64   17   18.924   15.411  11.130
+ring.xxxxxx.xx. xxx.xxx.xxx.xxx  2 u    6   64   17   23.861   14.187   9.787
+ring.xxxx.xx.jp xxx.xxx.xxx.xxx  2 u    2   64   17   16.265    4.196   7.268

上記のようにリモートアドレスの前に*, +が付いたら同期がされています。

参考ページ

2008年05月04日(日) 19:52:09 Modified by rockie33jp




スマートフォン版で見る