Webmin で設定 †
- Webmin でログイン
- 【ハードウェア】の【システム時間】をクリック
- 【Time server sync】をクリック
- 【Timeserver hostnames or addresses】にタイムサーバーのホストを入力 (例):ntp1.jst.mfeed.ad.jp
- 【スケジュールに従い同期させますか?】に「はい、以下の時刻で..」をチェックする
- 日時を設定して、【同期し適用する】ボタンを押下する。
ntpdate + cron †
[root@linux ~]# vi /etc/cron.daily/ntpdate.cron
#!/bin/sh
/usr/sbin/ntpdate ntp1.jst.mfeed.ad.jp
chmod 755 /etc/cron.daily/ntpdate.cron
NTPサーバー †
NTPサーバ インストール確認 †
rpm コマンドで確認 †
[root@linux ~]# rpm -qa | grep ntp
ntp-4.2.0.a.20040617-4.EL4.1 ←■ インストールされています
chkfontpath-1.10.0-2
[root@linux ~]#
yum コマンドで確認 †
[root@linux ~]# yum list | grep ntp
chkfontpath.i386 1.10.1-1.1 installed
ntp.i386 4.2.2p1-7.el5 base ←■ インストールされていません
[root@linux ~]#
NTPサーバ インストール †
[root@linux ~]# yum -y install ntp
Setting up Install Process
Setting up repositories
~ 中略 ~
Installed: ntp.i386 0:4.2.0.a.20040617-4.EL4.1
Complete!
[root@linux ~]#
NTPサーバ 設定 †
[root@linux ~]# vi /etc/ntp.conf ←■ ntp設定ファイル編集
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
※ 参照サーバーを変更する
#server 0.rhel.pool.ntp.org
#server 1.rhel.pool.ntp.org
#server 2.rhel.pool.ntp.org
↓↓ 時刻同期先NTPサーバーを変更
server eagle.center.osakafu-u.ac.jp # 大阪府立大学NTPサーバー
server ntp1.jst.mfeed.ad.jp # 公開NTPサーバー
server ntp2.jst.mfeed.ad.jp # 公開NTPサーバー
server ntp3.jst.mfeed.ad.jp # 公開NTPサーバー
:wq ←■ 保存して閉じる
[root@linux ~]#
NTPサーバー一覧 †
| 高エネルギー物理学研究所 | gps.kek.jp |
| 東京大学 | eric.nc.u-tokyo.ac.jp |
| 東京理科大学 | sutntp.sut.ac.jp |
| 東北大学 | ntp1.tohoku.ac.jp |
| 東北大学 | ntp2.tohoku.ac.jp |
| 豊橋技術科学大学 | ntp.tut.ac.jp |
| 大阪府立大学 | eagle.center.osakafu-u.ac.jp |
| 広島大学 | ns.hiroshima-u.ac.jp |
| 福岡大学 | clock.nc.fukuoka-u.ac.jp |
| 福岡大学 | clock.tl.fukuoka-u.ac.jp |
| インターネットマルチフィード(MFEED) | ntp1.jst.mfeed.ad.jp |
| インターネットマルチフィード(MFEED) | ntp2.jst.mfeed.ad.jp |
| インターネットマルチフィード(MFEED) | ntp3.jst.mfeed.ad.jp |
NTPサーバー起動 †
[root@linux ~]# ntpdate ntp.nict.jp
11 May 13:25:00 ntpdate[27438]: step time server 133.243.238.243 offset -38.872599 sec
[root@linux ~]#
[root@linux ~]# /etc/rc.d/init.d/ntpd status ←■ 起動確認
ntpd は停止しています
[root@linux ~]#
[root@linux ~]# /etc/rc.d/init.d/ntpd start ←■ NTPサーバー起動
ntpd を起動中: [ OK ]
[root@linux ~]#
[root@linux ~]# chkconfig --list ntpd ←■ NTPサーバー自動起動確認
ntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off ←■ 自動起動がOFFになっている
[root@linux ~]# chkconfig ntpd on ←■ 自動起動ONに設定
[root@linux ~]# chkconfig --list ntpd ←■ 自動起動再確認
ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off ←■ 自動起動確認(ランレベル2~5のonを確認)
[root@linux ~]#
NTPサーバー確認 †
[root@linux ~]# ntpq -p ←■ NTPサーバーへの時刻同期状態確認
remote refid st t when poll reach delay offset jitter
==============================================================================
*eagle.center.os .GPS. 1 u 59 64 377 39.759 -16.642 3.660
-ntp1.jst.mfeed. 210.173.176.251 2 u 52 64 377 23.855 -11.659 2.325
+ntp2.jst.mfeed. 210.173.176.251 2 u 52 64 377 24.169 -15.746 2.996
+ntp3.jst.mfeed. 210.173.176.251 2 u 59 64 377 23.477 -14.956 2.048
LOCAL(0) .LOCL. 10 l 43 64 377 0.000 0.000 0.002
[root@linux ~]#