免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1235 | 回复: 0
打印 上一主题 下一主题

[原创]个人笔记:NTop的安装以及与Cacti的结合 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-11-18 23:55 |只看该作者 |倒序浏览
[原创]个人笔记:NTop的安装以及与Cacti的结合
源自:杨志刚博客 (
http://yangzhigang.cublog.cn
)

下载、解压
[root@centos53 /]# cd /usr/local/src
[root@centos53 /]# wget
http://cactiusers.org/downloads/ntop.tar.gz
[root@centos53 /]# tar zxvf ntop-0.1.tar.gz

MV to cacti/plugins
[root@centos53 /]# mv ntop/ /var/www/cacti/plugins/

ADD && Active
[root@centos53 /]# vi /var/www/cacti/include/global.php
$plugins = array();
  $plugins[] = 'ntop';

Cacti Configure
[Plugin Management]:    ntop status:Old Plugin Architecture -Running
[User Management]:      admin----View NTop

查看
点顶部标签:NTop 出错,ERROR_INTERNET_CANNOT_CONNECT   
http://xxx.xxx.xxx.xxx:3000/

[root@centos53 plugins]# netstat -ant |grep :3000
可以发现系统没有listen 3000端口。
其实,以上操作只是在cacti中加了一个ntop的标签而以(也可以说是一个外壳),还有一个比以上操作还要简单一点的方法就是用superlinks插件做一个TOP TAB(name:NTop),URL为:
http://xxx.xxx.xxx.xxx:3000/
是一样的效果。
另,通过find / -name ntop* 查一下,也可以发再根本就没有ntop程序。

下载安装ntop程序
[root@centos53 /]# yum -y install ntop

NTop主要文件目录的说明
/etc/ntop.conf               //配置文件
/etc/logrotate.d/ntop        //滚动日志
/etc/rc.d/init.d/ntop        //ntop服务
/usr/lib/ntop                //ntop库文件
/usr/share/ntop              //ntop文档文件目录
/usr/bin/ntop                //ntop程序

NTop配置文件
[root@centos53 /]# vi /etc/ntop.conf
--user ntop               //用户名
--db-file-path /var/ntop  //数据库存放路径
--interface eth0          //接收数据包的网卡
--use-syslog              //记录日志
--http-server 3000        //运行端口
--daemon                  //守护进程方式运行

NTop第一次启动(初始化)
[root@centos53 /]# less /usr/share/doc/ntop-3.3.8/1STRUN.txt  //第一次运行说明
The (recommended) minimal command line is:
/usr/bin/ntop -P  -u  -A
#-P [directory]指定.db档存放路径
#-u [user]指定service启动user
#-A 设定admin密码,ntop会内建admin管理者帐号于ntop中

如:
[root@centos53 /]# /usr/bin/ntop -P /var/ntop -u ntop -A
Fri Nov 13 14:36:23 2009  NOTE: Interface merge enabled by default
Fri Nov 13 14:36:23 2009  Initializing gdbm databases

ntop startup - waiting for user response!
Please enter the password for the admin user: admin
Please enter the password again: admin
Fri Nov 13 14:37:09 2009  Admin user password has been set
以上操作ntop初始化就完成了。

启动运行
[root@centos53 /]# /usr/bin/ntop @/etc/ntop.conf &
或加入启动脚本
[root@centos53 /]# echo "/usr/bin/ntop @/etc/ntop.conf &" >>/etc/rc.d/rc.local

浏览
http://xxx.xxx.xxx.xxx:3000

查看Cacti中的TOP TAB:NTop
我的正常,你的呢?

另:如要安装更新一点的NTop,可以采用源码安装。
也可以不用yum -y install ntop的方式安装,而是采用源码、配置、编译的方式安装。
=-=-=-=-=-=-=-=-=-=-=-=-=-=源码安装-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  _   _ _
  | \ | | |_ ___  _ __
  |  \| | __/ _ \| '_ \
  | |\  | || (_) | |_) |
  |_| \_|\__\___/| .__/
                 |_|
                       Network Top
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


[/url]






本文来自ChinaUnix博客,如果查看原文请点:[url]http://blog.chinaunix.net/u2/71257/showart_2097929.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP