NTPによる時刻同期(NTPクライアント)

NTPがインストールされていることを確認

# rpm -qa | grep ntp
ntp-4.2.0.a.20040617-4.EL4.1

設定ファイル変更

  /etc/ntp.conf

# --- OUR TIMESERVERS -----
#server 0.pool.ntp.org
#server 1.pool.ntp.org
#server 2.pool.ntp.org
server ntp-server

サービス起動 & 自動起動

# /etc/init.d/ntpd start
# chkconfig ntpd on

設定確認コマンド

# ntpq -p


remote refid st t when poll reach delay offset jitter
==============================================================================
*ntp-server LOCAL(0) 4 u 40 1024 377 1.565 1.435 0.039
LOCAL(0) LOCAL(0) 10 l 55 64 377 0.000 0.000 0.004

  • "*" : 現在、このタイムサーバとの同期を取っている。
  • "+" : "*"と共にタイムサーバのクラスタを形成している
  • "-" : クラスタには使われていない

# ntpq -p NTPサーバ名
 NTPサーバとの通信確認

# ntpdate NTPサーバ名
 時刻同期コマンド