- サーバ時刻設定(NTP) -
サーバーにntpクライアントをインストールしておけば、ntpサーバーに接続して正確な時間を取得することができます。
自動で正確な時刻を取得するように設定・保存します。
root@hoge123:~# aptitude -y install ntp ← ntpサービスをインストールします。
root@hoge123:~# vi /etc/ntp.conf ← 設定ファイルを編集します。
46行目付近に時刻同期を許可するローカルネットワークの追記をします。(下記内容を追記します。)
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap
root@hoge123:~# service ntp restart
* Stopping NTP server ntpd [ OK ]
* Starting NTP server ntpd [ OK ]
root@hoge123:~# ntpq -p
remote refid st t when poll reach delay offset jitter
================================================================
fnttkyo043241.t 165.246.43.176 3 u 56 64 1 32.071 19.007 0.001
doga.jp 133.243.238.163 2 u 55 64 1 39.029 20.711 0.001
chiba.ocn.likk. 133.100.9.2 2 u 54 64 1 29.072 20.746 0.001
europium.canoni 193.79.237.14 2 u 53 64 1 284.849 27.565 0.001
|
※ 自宅サーバ構築(Ubuntu12.04TLS)に戻る