NTPサーバーインストール

# yum install ntp

/etc/ntp.confの修正

server 0.rhel.pool.ntp.org
server 1.rhel.pool.ntp.org
server 2.rhel.pool.ntp.org

server ntp1.jst.mfeed.ad.jp
server ntp2.jst.mfeed.ad.jp
server ntp3.jst.mfeed.ad.jp

最初の時刻合わせ

NTPサーバー起動時に大幅に時刻がずれているとNTPサーバーが起動できないので、
いったん、手動で時刻を合わせる必要がある。
# ntpdate ntp1.jst.mfeed.ad.jp

NTPサーバの起動

# /etc/rc.d/init.d/ntpd start
# chkconfig ntpd on

NTPサーバの動作状態確認

# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*ntp1.jst.mfeed. 210.173.176.4 2 u 76 256 377 4.723 -0.203 0.699
+ntp2.jst.mfeed. 210.173.160.86 2 u 49 256 377 4.695 0.066 0.364
+ntp3.jst.mfeed. 210.173.160.56 2 u 8 256 377 4.524 0.190 0.109
LOCAL(0) .LOCL. 10 l 14 64 377 0.000 0.000 0.001

例えば上記のように表示されれば時刻同期は正常に完了している。
*がついているホストでローカルの時刻合わせが行われたという意味

参考リンク


最終更新:2008年12月28日 11:18