NTPサーバーによりサーバーのシステム時刻を日本標準時間に自動的に合わせます。
Windows xp 以上のosを持つpcにもこの時刻同期システムが標準で搭載されています。
GNOME端末より
# rpm -q ntp → パッケージがインストールされているかを確認
(通常CentOS5には標準で搭載されています。)
------ インストールされていない場合は続けて下記を実行します。 ------
# yum install ntp
-------------------------------------------------------------------------------------
# vi /etc/ntp.conf → ntp設定ファイルを編集します。
(省略)
# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
→ アンコメントを解除(restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap)し内部からの時刻同期を許可します。
(省略)
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.centos.pool.ntp.org → コメントアウトします。
server 1.centos.pool.ntp.org → コメントアウトします。
server 2.centos.pool.ntp.org → コメントアウトします。
→ 追加(server -4 ntp.nict.jp # 日本標準時を提供)
→ 追加(server -4 ntp.jst.mfeed.ad.jp # 上記サーバーと直接同期)
# chkconfig ntpd on → NTPサーバーを自動起動する様に設定
# chkconfig --list ntpd → 設定の確認
# service ntpd stop → NTPサーバーを一時停止
# service ntpd start → NTPサーバーを再起動
コメントする