| はじめての自宅サーバ構築 - Fedora/CentOS - | Last Update | 2008/05/16 | |
| It opened to 2004/09/19. 当サイトはFedora9で運用しています |
Visitors Pageviews Today(IP/PV) |
3,251,536 12,003,353 2,005/12,010 |
|
デルではおとくなキャンペーン実施中! |
レノボ Web 広告限定ストア(キャンペーン&新着情報) |
# yum -y install ntp |
オリジナルの設定ファイルをバックアップ(リネーム) # mv /etc/ntp.conf /etc/ntp.conf.bak 設定ファイルの編集 # vi /etc/ntp.conf driftfile /var/lib/ntp/drift server ntp1.jst.mfeed.ad.jp server ntp2.jst.mfeed.ad.jp server ntp3.jst.mfeed.ad.jp 上記は、『インターネットマルチフィード時刻情報サービス for Public』の公開 NTPサーバを利用させて頂いております。 他にも主なNTPサーバはM&M(Usagi.to.Kame)のNTPサーバ一覧で確認できます。 |
手動でサーバの時刻を同期する # ntpdate ntp1.jst.mfeed.ad.jp 28 Oct 23:17:57 ntpdate[20256]: adjust time server 210.173.160.27 offset -0.002489 sec ntpサービスを起動する # /etc/rc.d/init.d/ntpd start ntpd を起動中: [ OK ] |
起動時にntpを起動する # chkconfig ntpd on 設定内容を確認 # chkconfig --list ntpd ntpd 0:オフ 1:オフ 2:オン 3:オン 4:オン 5:オン 6:オフ |
ntpが動作して、同期しているか確認
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp1.jst.mfeed. 210.173.160.56 2 u 3 64 1 7.224 0.041 0.001
ntp2.jst.mfeed. 210.173.160.86 2 u 2 64 1 7.680 0.214 0.001
ntp3.jst.mfeed. 210.173.160.86 2 u 1 64 1 7.105 -0.092 0.001
上記の様に、設定ファイルに指定したNTPサーバが表示されればntpが動作している。
また、指定したNTPサーバの先頭が空白時は同期中を表します。
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
+ntp1.jst.mfeed. 210.173.160.56 2 u 47 64 37 7.242 1.006 0.339
*ntp2.jst.mfeed. 210.173.160.56 2 u 48 64 37 6.969 1.189 1.122
ntp3.jst.mfeed. 210.173.160.86 2 u 39 64 37 7.151 1.263 0.362
上記の様に、指定したNTPサーバの先頭に+や*が表示された場合は同期が完了しています。
|
