Sysadmin > NtP > HowtoBuildNtp
!/bin/sh
#export http_proxy=http://10.133.65.201:3128/
#export HTTP_PROXY=http://10.133.65.201:3128/
NTPBINURL=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2
NTPBIN=ntp-4.2.8p9.tar.gz
cd /opt/src
curl -OL --proxy http://10.133.65.201:3128/ $NTPBINURL/$NTPBIN
curl -OL --proxy http://10.133.65.201:3128/ $NTPBINURL/$NTPBIN.md5
md5sum $NTPBIN
cat $NTPBIN.md5
echo "\nStimmt die Checksum? (y/n)"
#read checksumok
tar xvfz $NTPBIN
#aptitude update
#aptitude -y install libcap-dev
#aptitude -y install build-essential
cd `echo $NTPBIN | sed 's/\.tar\.gz//g'`
# Fuer enable-linuxcaps muss bei neuen Versionen libcap-dev installiert sein
./configure --enable-clockctl --enable-linuxcaps --prefix=/opt/ntp
make
make install
#mkdir /opt/ntp/etc
#cp /etc/ntp.conf /opt/ntp/etc
#cp /etc/ntp.keys /opt/ntp/etc
#cp /etc/leap-seconds.list /opt/ntp/etc
#cd /etc/init.d
#cat ntp | sed 's/DAEMON=\/usr\/sbin\/ntpd/DAEMON=\/opt\/ntp\/bin\/ntpd/g' | sed 's/PATH=\/sbin:\/bin:\/usr\/sbin:\/usr\/bin/PATH=\/opt\/ntp\/bin:\/sbin:\/bin:\/usr\/sbin:\/usr\/bin/g' > local.ntp
#./ntp stop
#find /etc/rc* -name "*ntp*" -exec rm {} \;
#cd /etc/rc1.d/
#ln -s ../init.d/local.ntp K77local.ntp
#cd ../rc2.d/
#ln -s ../init.d/local.ntp S23local.ntp
#cd ../rc3.d/
#ln -s ../init.d/local.ntp S23local.ntp
#cd ../rc4.d/
#ln -s ../init.d/local.ntp S23local.ntp
#cd ../rc5.d/
#ln -s ../init.d/local.ntp S23local.ntp
#/etc/init.d/local.ntp start

#rm $NTPBIN
#rm $NTPBIN.md5