![]() |
| ◆ | ntp のインストール |
| [root@centos]# yum -y install ntp <--- 入力 |
|
| ◆ | ntp の設定 |
| 時刻を日本標準時間に合わせる | |
| [root@centos]# ntpdate ntp.nict.jp <--- 入力 |
|
| 時刻設定ファイルの作成 | |
| [root@centos]# vi /etc/ntp.conf <--- 入力 途中略 # Hosts on local network are less restricted. #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap <--- コメント解除(LAN内からの同期を許可) ↓ 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 iburst <--- 独立行政法人 情報通信研究機構のNTPサーバーに変更(日本標準時) server -4 ntp.nict.jp iburst -4 は強制的に IPv4 を使用するためのオプションです server -4 ntp.nict.jp iburst IPv6 で接続可能な場合はいらない(その場合、IPv6 が優先される) ※同じ内容を3行記述する事 server -4 ntp.jst.mfeed.ad.jp <--- 上記サーバーと直接同期しているサーバー 以下略 |
|
| ◆ | ntp の起動 |
|
[root@centos]# /etc/rc.d/init.d/ntpd start <--- 入力 |
|
| ntpd の自動起動設定 | |
|
[root@centos]# chkconfig ntpd on <--- 入力 |
|
| 自動起動設定の確認 | |
|
[root@centos]# chkconfig --list ntpd <--- 入力 ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off <--- 2・3・4・5 が on になっていればOK |
|
| ntp の起動 &時刻調整の確認 | |
|
[root@centos]# ntpq -p <--- 入力 remote refid st t when poll reach delay offset jitter ============================================================================== *ntp-b3.nict.go. .NICT. 1 u 15 64 1 9.920 8.975 0.290 +ntp-b2.nict.go. .NICT. 1 u 14 64 1 6.758 8.653 0.223 +210.171.226.40 .NICT. 1 u 13 64 1 9.353 7.853 0.873 |
|
| 上記のようにサーバー名(アドレス)の前に + - * のマークが付いていればネット上にあるメインNtpサーバーと同期が取れている | |
| もし、 + - * のマークが付いていない場合は10〜15分ぐらい経ってから再度実行 | |
| ◆ | クライアント(Windows)機の時刻同期 |
| タスクバー右端の時計の上で右クリックして『日付と時刻の調整』をクリック | |
|
|
|
| 『インターネット時刻』のタブをクリックし、『設定の変更』をクリック | |
|
|
|
| 『インターネット時刻サーバーと同期する』の前のチェックボックスにチェックを入れ、サーバー欄にNtpサーバーのIPアドレスを入力して『今すぐ更新(U)』クリック | |
|
|
|
| 『OK』をクリック | |