centos5.5安装ntop

我使用的linux系统是centos5.5,有些系统服务版本比较低或者没有,需要手动去安装,例如实验ntop依赖Python2.6以上的版本,但系统自带的版本则是2.4。

使用yum快速安装ntop的依赖包:

$ yum install libpcap libpcap-devel libtool linpng gdbm libxml2-devel gdbm-devel  svn  pango-devel pango subversion GeoIP GeoIP-devel

如果不安装svn和subversion,在编译的安装的时候回报以下的错误:

You must have svn/subversion installed to compile autogen.sh.

Download the appropriate package for your distribution, or get the

source from http://subversion.tigris.org

$ tar zxf ntop-5.0.1.tar.gz

$ cd ntop-5.0.1

$ ./autogen.sh --with-tcpwrap

第一个错误:

configure: error: Unable to find RRD at /usr/local: please use --with-rrd-home=DIR

解决方法:

$wget http://down1.chinaunix.net/distfiles/rrdtool-1.3.5.tar.gz

$tar zxf rrdtool-1.3.5.tar.gz

$cd rrdtool-1.3.5

$./confogure --prefix=/usr/local/rrdtool

$make && make install

$ ./autogen.sh --prefix=/usr/local/ntop  --with-tcpwrap --with-rrd-home=/usr/share/rrdtool/

第二个错误:

checking for python-config... no

>>>> Unable to locate python-config: using workaround <<<<

checking for python... python

checking Checking python version... Old python installed

Please install python 2.6 or newer.

解决方法:

#wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz

#tar zxvf Python-2.7.3.tgz

#cd Python-2.7.3

$ cd Python-2.7.3

$ ./configure --prefix=/usr/local/python27

$mv /usr/bin/python /usr/bin/python.old

$ ln -s /usr/local/python27/bin/python /usr/bin/

$ python

Python 2.7.3 (default, Oct  9 2014, 15:06:43)

[GCC 4.1.2 20080704 (Red Hat 4.1.2-55)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>>  ( ctrl+d )=退出

安装完以后会发现yum不能使用,因为yum需要依赖于/usr/bin/python运行,所以,要做一下修改。

$vi /usr/bin/yum 把#!/usr/bin/python改为#!/usr/bin/python.old

第三个错误:

Removing dups and misplaced entries from LIBS and INCS...

checking for GeoIP_record_by_ipnum in -lGeoIP... no

checking for GeoIP_name_by_ipnum_v6 in -lGeoIP... no

Please install GeoIP (http://www.maxmind.com/)

解决方法:

明明我在开始的时候就已经通过yum方式安装了GeoIP GeoIP-devel,为什么还报这样的错呢?在这里纠结的好久,最后在网上找到的解决方法。

$ wget http://www.maxmind.com/download/geoip/api/c/GeoIP.tar.gz

$ tar zxf GeoIP.tar.gz

$ cd GeoIP-1.4.8/

$ ./configure && make && make install

$wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz

$tar zxf GeoIP.tar.gz

$cd GeoIP-1.3.2

$ python setup.py build

$ python setup.py install

最后就应该可以编译安装了。

[[email protected] rrdtool-1.3.5]# ./autogen.sh --prefix=/usr/local/ntop  --with-tcpwrap --with-rrd-home=/usr/share/rrdtool/

[[email protected] rrdtool-1.3.5]#  make $$ make install

$ groupadd ntop

$useradd -M -s /sbin/nologin -g ntop ntop

$ chown -R ntop.ntop /usr/local/ntop/share/ntop

$ chown -R ntop.ntop /usr/local/ntop/var/ntop/

$ chown -R ntop.ntop /usr/local/ntop/lib/

配置ntop的管理员密码:

$ntop -A

授权外部iP地址通过tcp-wrappers

$echo ‘ntop 192.168.1.114‘ >> /etc/hosts.allow

拒绝外部ip地址:

$echo ‘ntop:ALL‘ >> /etc/hosts.deny

启动ntop:

$ cd /usr/local/ntop/bin

$./ntop

通过浏览器访问:http://ip:3000

时间: 2024-08-04 14:36:38

centos5.5安装ntop的相关文章

centos5.5 安装cacti-0.8.7成功

1.准备的环境 lamp基本环境 其他需要的编译环境 yum install gcc gcc-c++ yum install lib*yum install apr* yum install net-snmp* 2.启动snmpd httpd mysqld 3.安装rrdtool-1.4.5.tar.gz ./configure --prefix=/usr/local/rrdtoolmake && make instal 4.安装cacti-0.8.7.tar.gz tar -zxvf c

centos-5.5安装vmvare tools

centos-5.5安装vmvare tools 虚拟机管理,安装tools 找到VMwareTools压缩包 解压到Desktop,桌面 终端进入桌面 执行程序# ./vmware-install.pl 按回车一直下去,有人说是选分辨率,有人说是看到 To use the vmxnet driver, restart networking using the following commands: /etc/init.d/network stop rmmod pcnet32 rmmod vmx

Cadence IC616及MMSIM141在CentOS5.11安装图文实录

Cadence IC616及MMSIM141在CentOS5.11安装图文实录 准备 虚拟机硬盘扩容 我使用的系统为VirtualBox虚拟机安装的CentOS5.11.因为装系统时分配的硬盘空间只载一个容量为20G的分区,为了安装Cadence Virtuoso及其它配套的EDA软件,首先要做的事情是为系统硬盘扩容. 扩容考虑过两种方案: 直接增大虚拟机硬盘容量: 新建一个虚拟机硬盘,并将其挂载在Linux系统下. 先试用方法1,这里参考了hk2305621在ChinaUnix的文章[1].

CentOS 6.6 安装ntop 网络流量监控工具

教程目标:CentOS 6.6 安装ntop 网络流量监控工具 日    期:2015年08月20日 联系邮箱:[email protected] Q Q  群:1851 15701 51CTO博客首页:http://990487026.blog.51cto.com ====================================准备阶段:              1,安装环境:       CentOS 6.6 X64 Dektopa桌面安装[中文,英文,要带有完整字库的,都可以],

centos5.8 安装配置vsftp虚拟用户

vsftp因为公司时不时要用,也不是经常弄ftp,不常用就老是忘记有些东西,所以就在网上查些资料和自己遇到的一些问题结合起来写一个文档,以后需要使用ftp的时候搭建比较方便,使用虚拟用户不用担心用户登录服务器,你想让他在那个目录呆着就在那,而且修改权限方便,每个用户需要什么权限可以不同的修改,可以满足多方面的需要,所以推荐使用虚拟用户.第一次写博文,如有错误请指教! 1.查看安装包 [[email protected] ~]# rpm -qa | grep vsftpd vsftpd-2.0.5

CentOS5.5安装GNOME桌面 ? 三叶草

body { font-family: 微软雅黑; font-size: 10.5pt; line-height: 1.5; } html, body { color: ; background-color: ; } h1 { font-size:1.5em; font-weight:bold; } h2 { font-size:1.4em; font-weight:bold; } h3 { font-size:1.3em; font-weight:bold; } h4 { font-size:

Centos5下安装tfs并使用nginx做访问

操作系统环境 [[email protected] ~]# uname -aLinux localhost.localdomain 2.6.18-371.9.1.el5 #1 SMP Tue Jun 10 17:49:56 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux[[email protected] ~]# cat /etc/issueCentOS release 5.10 (Final)Kernel \r on an \m [[email protecte

CentOS5.4安装samba服务

一.匿名用户访问samba服务 1.安装centos5.4,在安装界面将samba服务一并安装. 2.编辑samba服务设置:vi /etc/samba/smb.conf workgroup=work netbois name=centos9140 security=share [public] public=yes path=/usr guest ok=yes writable=yes browseable=yes available=yes 这个操作是匿名用户对samba共享进行读写操作.

ORACLE CentOS5.6安装

1 准备 CentOS 5.6企业版 oracle11g fs 安装.安装环境为vmware虚拟机.另外,本安装文档非常简洁,但关键步骤都指出来了,其他的都是默认选择,遇到不知该如何选择的操作或者问题时,多想一想,则能学到更多东西. 1.1 CentOS 5.6系统安装 Ø 在windows上使用vmware安装一台虚拟机,安装ISO为CentOS-5.6-i386-bin-DVD.iso. vm选择操作系统类型的时候,选择red hat 企业版 5.5 Ø 网络模式选择host-only,这是