CentOS 6
Sponsored Link

NTPd : Configure NTP Server
2014/08/02
 
Install NTPd and Configure NTP server for time adjustment.
[1] Install and Configure NTPd.
[root@dlp ~]#
yum -y install ntp
[root@dlp ~]#
vi /etc/ntp.conf
# line 19: add the network range you allow to receive requests

restrict 10.0.0.0 mask 255.255.255.0 nomodify notrap
# change servers for synchronization to your timezone

#
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 ntp1.jst.mfeed.ad.jp iburst
server ntp2.jst.mfeed.ad.jp iburst
server ntp3.jst.mfeed.ad.jp iburst
[root@dlp ~]#
/etc/rc.d/init.d/ntpd start

Starting ntpd: [ OK ]
[root@dlp ~]#
chkconfig ntpd on

[2] If Iptables is running, allow NTP port. NTP uses 123/UDP.
For "-I INPUT 5" section below, Replace it to your own environment.
[root@dlp ~]#
iptables -I INPUT 5 -p udp -m state --state NEW -m udp --dport 123 -j ACCEPT

[3] Verify it works normally like follows.
[root@dlp ~]#
ntpq -p

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+ntp1.jst.mfeed. 172.29.1.100     2 u   29   64    1   18.826   -0.126   0.000
+ntp2.jst.mfeed. 172.29.2.50      2 u   28   64    1   21.592    0.018   0.000
*ntp3.jst.mfeed. 133.243.236.18   2 u   28   64    1   22.666   -1.033   0.000
Matched Content
 
Tweet