设为首页 收藏本站
查看: 1549|回复: 0

[经验分享] RHEL5.5编译安装ntop

[复制链接]

尚未签到

发表于 2019-1-26 12:18:35 | 显示全部楼层 |阅读模式
  ====================================================
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转换用户和用户组……英语,介个,不要让我翻译,小心把你们都带沟里去。




运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-667795-1-1.html 上篇帖子: ubuntu 配置ntop 监控本地网络 下篇帖子: 用bandwidthd监控IP流量
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表