Ntop 安装以及配置 试验环境:
在一台为监控服务器,192.168.100.210的机器安装Ntop,之前这个机器已
经装过cacti了.
声明:
安装ntop之前要安装libpcap和rrdttool
我这里安装的是 ntop-3.3、 Libpcap-0.9.8、r rdtool1.2.27
1. 安装libpcap
# tar zxvf libpcap-0.9.8.tar.gz
# cd libpcap-0.9.8
#./configure
# make&&make install
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./pcap-linux.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./fad-getad.c
In file included from ./fad-getad.c:64:
/usr/include/linux/if_packet.h:52: 错误:expected specifier-qualifier-list before ‘__u32’
make: *** [fad-getad.o] 错误 1
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./fad-getad.c
In file included from ./fad-getad.c:64:
/usr/include/linux/if_packet.h:52: 错误:expected specifier-qualifier-list before ‘__u32’
make: *** [fad-getad.o] 错误 1
在网上找啊找,终于有一篇说明了解决的办法.
将
#include
加入到
/usr/include/linux/if_packet.h
再make&&make install,ok这次再没有出现错误了.
我们到ntop的安装目录,执行下面的命令:
#./autogen.sh
configure: error: Unable to find RRD at /usr/local/rrdtool: please use --with-rrd-home=DIR
它提示找不到rrdtool,让我们用--with-rrd-home指定rrdtool的安装目录,但是奇怪的是我指定了安装路径依旧报错,很是郁闷,为什么呢?在网上查找相关资料,都是没有装rrdtool才导致这个问题的,我于是纳闷了,突然想到是不是版本太久的缘故,于是下了个rrdtool-1.2.27的进行了安装,然后指定相应的路径OK了,哎真没有想到是因为版本的原因,郁闷。。。。。。。。安装rrdtool的过程如下:
#tar -zxvf rrdtool-1.2.27.tar.gz
# cd rrdtool-1.2.27
#./configure --prefix=/usr/local/rrdtool2
# Make&&make install
再到ntop目录下,运行autogen.sh,通过
#./configure --prefix=/usr/local/ntop\
-with-rrd-home=/usr/local/rrdtool2
# Make&& make install
# cp ntop-3.3/packages/RedHat/ntop.conf.sample\
/usr/local/ntop/etc/ntop/ntop.conf
# /usr/local/ntop/bin/ntop -P /usr/local/ntop/share/ntop -u nobody
-A
Mon Mar 31 07:18:53 2008 NOTE: Interface merge enabled by default
Mon Mar 31 07:18:53 2008 Initializing gdbm databases
ntop startup - waiting for user response!
Please enter the password for the admin user:
Password too short (5 characters or more). Please try again.
ntop startup - waiting for user response!
Please enter the password for the admin user: // 这里输入密码
Please enter the password again: // 再此输入密码
Mon Mar 31 07:19:08 2008 Admin user password has been set
/usr/local/ntop/bin/ntop @/usr/local/ntop/etc/ntop/ntop.conf
-I eth0 -m 192.168.100.0/24
然后输入http:://IP:3000,出现如下的界面:
运维网声明
1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网 享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com