cd /home/yongzhen/tools/
wget http:
ll
tar xf ntp-4.2.8p4.tar.gz
cd ntp-4.2.8p4
./configure --prefix=/usr/local/ntp --enable-all-clocks --enable-parse-clocks
echo $?
make&&make install
echo $?
vi /etc/ntp.conf
在restrict
default
nomodify notrap noquery(表示默认拒绝所有IP的时间同步)之后增加一行:
restrict 172.16.1.0 mask 255.255.255.0 nomodify
/usr/local/ntp/bin/ntpd -c /etc/ntp.conf -p /tmp/ntpd.pid
ps -ef |grep ntp