====================================================
RHEL5.5编译安装ntop-3.3源码包
原创
©著作权归作者所有:来自51CTO博客作者smileliuyb的原创作品,请联系作者获取转载授权,否则将追究法律责任
1.解压缩源码包
tar fvxz ntop-3.3.tar.gz
2.查看ntop的dos下的BUILD-NTOP.txt文件
Using their RedHat package names, these are:
- glibc, glibc-devel, gcc, cpp
- Some version of awk
- libtool (1.4+)
Note that there are reports of success with libtool 1.3.x under
FreeBSD so the script allows this.
- m4
- autoconf (2.53+)
- automake (1.6+)
- gdbm, gdbm-devel
- libpcap (http://www.tcpdump.org)
- gd, gd-devel
- libpng, libpng-devel
1b. Optional packages
- openssl, openssl-devel (http://www.openssl.org)
- zlib, zlib-devel
3.根据BUILD-NTOP文件得知,需要安装下面软件包
yum install glibc glibc-devel gcc cpp libtool autoconf automake gdbm gdbm-devel libpcap gd gd-devel libpng libpng-devel openssl openssl-devel zlib zlib-devel
4.第一次尝试编译ntop
cd ntop
./autogen.sh
#编译失败,根据如下错误信息,可知编译缺失C++编译库
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
#查找C++编译库文件
yum search c++
#安装c++编译库文件
yum install gcc-c++
5.第二次尝试编译ntop
./autogen.sh
#编译失败,错误信息如下,可知系统自带libpcap文件不能达到编译所需需求。
It looks that you don't have the libpcap distribution installed.
====================================================
6.编译安装libpcap
tar fvxz libpcap-0.8.3.tar.gz
cd libpcap
#这个我就没找到哪个是build说明文件了,readme里面也没有说明编译需求,所以先试着编译一下
./configure
#第一次编译失败,由以下错误信息可知缺少flex软件包
configure: error: Your operating system's lex is insufficient to compile libpcap. flex is a lex replacement that has many advantages, including being able to compile libpcap.
#安装flex软件包并重新编译libpcap
yum install flex
./configure
make
#make错误,由以下错误信息可知缺少yacc软件包
make: yacc: Command not found
#使用yum查找,发现只有byacc软件包,安装byacc并重新make,make通过。
yum search yacc
yum install byacc
make
make install
7.第三次尝试编译ntop
cd ntop
./autogen.sh
#编译错误,错误信息如下
configure: error: Unable to find RRD at /usr/local/rrdtool: please use --with-rrd-home=DIR
#由错误信息可知,需要rrdtool软件包
====================================================
8.编译rrdtool软件包
tar fvxz rrdtool-1.2.13.tar.gz
cd rrdtool
#介个,囧了,这个我也没找到安装需求的说明问题
./configure
#编译错误,由以下错误信息可知,缺少libart软件包中部分内容
I found a copy of pkgconfig, but there is no libart-2.0.pc file around. You may want to set the PKG_CONFIG_PATH variable to point to its location.
#查询系统中是否libart软件包
rpm -qa | grep libart
#发现系统已经安装了libart-lqpl-2.3.17-4软件包,使用yum查询,发现具有一个libart_lgpl-devel.i386软件包,安装并尝试再次编译,编译通过
yum search libart
yum install libart_lgpl-devel
./configure
make
make install
9.第四次尝试编译ntop
cd ntop
./configure
#再次报错,错误信息如下
configure: error: Unable to find RRD at /usr/local/rrdtool: please use --with-rrd-home=DIR
#发现仍然是rrdtool错误,考虑安装rrdtool时使用默认目录,查找发现rrdtool安装在/usr/local/rrdtool-1.2.13目录下,增加参数并再次编译。
./configure --with-rrd-home=/usr/local/rrdtool-1.2.13/
*******************************************************************
*
* NOTE: ./configure is now complete!
*
* All of the obviously FATAL errors would cause you to
* abort before this point, so while you SHOULD scroll
* back and check for error/warning/note messages,
* you probably will not...
*
++
++ If you like ntop, please do not forget to support its
++ development. See SUPPORT_NTOP.txt for more information.
++
++ Thanks for supporting ntop!
++
*
* NEXT STEP(S):
*
* Building ntop requires GNU Make, so to build ntop, type
* 'make' (or on *BSD and Solaris systems, 'gmake')
*
*******************************************************************
#编译成功,执行make命令
make
make install
#软件安装完成,这时会有一个warnning信息,大概是说ntop目录需要属于神马用户,使用chown转换用户和用户组……英语,介个,不要让我翻译,小心把你们都带沟里去。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Kali Linux环境下源码编译Snort
本文介绍,新手快速掌握源码编译Snort的方法。
Kali 源码编译 编译过程