00.[root@ntp ~]# wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.6p2.tar.gz
[root@ntp ~]# tar -zxvf ntp-4.2.6p2.tar.gz
[root@ntp ~]# cd ntp-4.2.6p2
[root@ntp ntp-4.2.6p2]# ./configure --prefix=/usr/local/ntp --enable-all-clocks --enable-parse-clocks
[root@ntp ntp-4.2.6p2]# make;make install
restrict -6 default kod nomodify notrap nopeer noquery #针对ipv6设置
restrict 127.0.0.1
restrict -6 ::1
# 允许的局域网络段
restrict 10.0.0.0 mask 255.0.0.0 nomodify motrap
restrict 192.168.0.0 mask 255.255.0.0 nomodify motrap
# 使用上层的internet ntp服务器
restrict 207.46.232.182 mask 255.255.255.255 nomodify notrap noquery
server 207.46.232.182
# 如果无法与上层ntp server通信以本地时间为标准时间
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
# 计算本ntp server 与上层ntpserver的频率误差
driftfile /var/lib/ntp/drift
# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys
#日志文件
logfile /var/log/ntp.log
报错了,是不是有问题呢,不要紧的,ntpd服务一般要等3-5分钟才能正常工作