NTP : NTPサーバーの設定 (NTPd)2014/07/08 | 
| 
 
NTPd をインストールして、時刻同期のための NTP サーバーを構築します。
 
 | 
|
| [1] | NTPd のインストールと設定です。 | 
| 
 
[root@dlp ~]#  
yum -y install ntp  
[root@dlp ~]#  
vi /etc/ntp.conf  # 18行目: 時刻同期を許可する範囲を追記 restrict 10.0.0.0 mask 255.255.255.0 nomodify notrap # 同期をとるサーバーを変更 # server 0.centos.pool.ntp.org iburst# server 1.centos.pool.ntp.org iburst# server 2.centos.pool.ntp.org iburst# server 3.centos.pool.ntp.org iburst
server ntp.nict.jp iburst 
server ntp1.jst.mfeed.ad.jp iburst server ntp2.jst.mfeed.ad.jp iburst systemctl start ntpd  [root@dlp ~]# systemctl enable ntpd   | 
| [2] | Firewalld を有効にしている場合は、NTPサービスの許可が必要です。なお、NTP は 123/UDP を使用します。 | 
| 
[root@dlp ~]#  firewall-cmd --add-service=ntp --permanent  success [root@dlp ~]# firewall-cmd --reload  success  | 
| [3] | 動作確認をしておきます。以下のように結果が返ってくれば OK です。 | 
| 
[root@dlp ~]#  ntpq -p 
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*ntp-a3.nict.go. .NICT.           1 u    1   64    1   17.715   -1.343   0.203
 ntp1.jst.mfeed. 133.243.236.17   2 u    -   64    1   18.011    0.846   0.023
 ntp2.jst.mfeed. 133.243.236.17   2 u    1   64    1   18.365    1.366   0.000
 | 
| Sponsored Link | 
| 
 |