ntpd服务在CentOS6.7上编译安装过程及问题

最近在编译升级ntpd碰到了几个坑

所以写写过程

最主要的问题是make的时候报错

make[3]: Entering directory ‘/ntp-4.2.8p10/mkbuild' 

CDPATH="${ZSH_VERSION+.}:" && cd .. && /bin/sh /ntp-4.2.8p10/sntp/libevent/build-aux/missing aclocal-1.15 -I sntp/m4 -I sntp/libevent/m4 -I sntp/libopts/m4 

/ntp-4.2.8p10/sntp/libevent/build-aux/missing : line 81: aclocal-1.15: command not found 

WARNING: 'aclocal-1.15' is missing on your system. 

You should only need it if you modified 'acinclude.m4' or 

'configure.ac' or m4 files included by 'configure.ac'. 

The 'aclocal' program is part of the GNU Automake package: 

< http://www.gnu.org/software/automake > 

It also requires GNU Autoconf, GNU m4 and Perl in order to run: 

< http://www.gnu.org/software/autoconf > 

< http://www.gnu.org/software/m4/ > 

< http://www.perl.org/ > 

make[3]: *** [../aclocal.m4] Error 127 
这个问题在好多文章都让升级automake...而升级automake又要先升级autoconf下载了源码包以后编译安装这两个 又报了很多错误。

放几个链接

ntp下载

http://support.ntp.org/bin/view/Main/SoftwareDownloads

aotuconf下载

http://mirrors.ustc.edu.cn/gnu/autoconf/

aotumake下载

http://mirrors.ustc.edu.cn/gnu/automake/

很多文章上说是aotumake 及 aotuconf的版本不一致造成的,而我属于升级没成功。又回到原点的。

于是发现了aotureconf这个命令                                             

ntpd服务在CentOS6.7上编译安装过程及问题_第1张图片

autoreconf,如果有多个autoconf产生的配置文件,autoreconf可以保存一些工作,它通过重复运行autoconf(以及在合适的地方运行autoheader)以重新产生autoconf配置脚本和配置头模板,这些文件保存在以当前目录为根的目录树中。

于是就有了新的编译安装流程

#update ntp to version 4.2.8p10
mv /etc/ntp /etc/ntp.bak
mv /etc/ntp.conf /etc/ntp.conf.bak
mv /etc/init.d/ntpd /etc/init.d/ntpd.bak
mv /etc/sysconfig/ntpd /etc/sysconfig/ntpd.bak
mv /etc/sysconfig/ntpdate /etc/sysconfig/ntpdate.bak
rpm -e --nodeps ntp-4.2.6p5-5.el6.centos.x86_64
rpm -e --nodeps ntpdate-4.2.6p5-5.el6.centos.x86_64
ln -s /lib64/libcap.so.2 /usr/lib/libcap.so
mv /root/tsoccfg/soft_update/capability.h /usr/include/sys/.
install -v -m710 -o ntp -g ntp -d /var/lib/ntp
cd /root/tsoccfg/soft_update/ntp-4.2.8p10
./configure --prefix=/usr --bindir=/usr/sbin --sysconfdir=/etc --enable-linuxcaps --with-lineeditlibs=readline --docdir=/usr/share/doc/ntp-4.2.8p10 --enable-all-clocks --enable-parse-clocks --enable-clockctl
autoreconf -f -i
make
make install
mv /etc/init.d/ntpd.bak /etc/init.d/ntpd
mv /etc/sysconfig/ntpd.bak /etc/sysconfig/ntpd
mv /etc/sysconfig/ntpdate.bak /etc/sysconfig/ntpdate
mv /etc/ntp.bak /etc/ntp
mv /etc/ntp.conf.bak /etc/ntp.conf



你可能感兴趣的:(ntpd服务在CentOS6.7上编译安装过程及问题)