NTPサーバーインストール
yum -y install ntp /etc/ntp.conf ← ntp設定ファイル編集
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap を追加 #server 0.centos.pool.ntp.org #server 1.centos.pool.ntp.org #server 2.centos.pool.ntp.org コメントアウトして日本用に書き直し
server ntp.nict.jp # 日本標準時を提供しているNTPサーバー(stratum 1) server ntp.jst.mfeed.ad.jp # 上記サーバーと直接同期しているNTPサーバー(stratum 2) server プロバイダのNTPサーバー名 # プロバイダのNTPサーバー※ 手動調整
1回目 ntpdate ntp.nict.jp 8 Jul 18:16:40 ntpdate[2352]: step time server 133.243.238.163 offset -28219.469647 sec 2回目 ntpdate ntp.nict.jp 8 Jul 18:17:01 ntpdate[2354]: adjust time server 133.243.238.244 offset 0.002021 sec 実行
/etc/rc.d/init.d/ntpd start
自動実行設定
chkconfig ntpd on
暫くして確認 [root@ssiscirine ~]# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== ntp-b2.nict.go. .NICT. 1 u 31 64 3 44.138 1.780 3.033 ntp1.jst.mfeed. 210.173.160.86 2 u 29 64 3 34.625 3.007 35.681 ns5.rdc1.kt.hom .INIT. 16 u - 64 0 0.000 0.000 0.000 ダメっぽい