NTPクライアントのセットアップをします。
(1)「ntp」をインストールする。
[root@example2 ~]# yum -y install ntp ntpdate
(2)「ntp」の設定をする。
[root@example2 ~]# mv /etc/ntp.conf /etc/ntp.conf.ori [root@example2 ~]# vi /etc/ntp.conf driftfile /var/lib/ntp/drift server -4 192.168.0.130 iburst restrict default ignore restrict 127.0.0.1 restrict 192.168.0.130 noquery noquery nomodify server 127.127.1.0 fudge 127.127.1.0 stratum 10 keys /etc/ntp/keys
(3)「ntp」を起動する。
[root@example2 ~]# /etc/rc.d/init.d/ntpd start ntpd を起動中: [ OK ] [root@example2 ~]# chkconfig ntpd on [root@example2 ~]# chkconfig --list ntpd ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
(4)時間の同期を確認する。
[root@example2 ~]# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *192.168.0.130 133.243.238.164 2 u 5 64 17 0.089 19.489 13.255 LOCAL(0) .LOCL. 10 l 21 64 17 0.000 0.000 0.000