ntopng基础

当你在本地网络监控网络流量,根据流量大小、监控平台/接口、数据库类型等等,可以有许多不同的选择。ntopng是一套开源(遵循GPLv3协议)网络流量分析解决方案,提供基于web界面的实时网络流量监控。支持跨平台,包括Linux和MacOS X。ntopng类似于RMON远端网络监控代理,具有内置的Web服务能力,使用Redis键值服务按时间序列存储统计信息。你可以在任何指定的监控服务器上安装ntopng,只需使用任一web浏览器,就能实时访问服务器上的流量报告了。

 

1. 安装ntopng

# 安装插件
yum install -y gcc gcc-c++ 
yum install -y libpcap  libpcap-devel   
yum install -y libxml2 libxml2-devel 
yum install -y glib2 glib2-devel 
yum install -y mysql mysql-server mysql-devel 
yum install -y git autoconf  automake gmake 
yum install -y libcurl-devel 
yum install -y sqlite sqlite-devel libtool 
yum install -y libtool

#安装redis:
wget http://download.redis.io/releases/redis-4.0.6.tar.gz
tar xzf redis-4.0.6.tar.gz
cd redis-4.0.6
make
src/redis-server
src/redis-cli
#测试
redis> set foo bar
OK
redis> get foo
"bar"

# 官网下载地址
https://www.ntop.org/get-started/download/

# 下载nDPI
git clone https://github.com/ntop/nDPI.git
cd nDPI
./autogen.sh
make
cd ../ntopng

# 下载ntopng,并安装:
git clone https://github.com/ntop/ntopng.git
cd ntopng
./autogen.sh
./configure
make
make install

2. 配置ntopng并启动ntopng

配置ntopng并启动ntopng:
vim /etc/ntopng.conf
#进程号
-G=/var/tmp/ntopng.gid
#指定监听本地的哪些网段
--local-networks=192.168.100.0/24,10.32.1.0/24
#指定监听哪张网卡
--interface=eth0
#指定监听哪个http端口,用于web管理
--user=root
--http-port=3000   

后台启动:
# ntopng redis
/usr/local/redis/src/redis-server &

# ntopng run command
/usr/local/bin/ntopng /etc/ntopng/ntopng.conf &

3. 访问

#http://ip:3000  认证用户admin/admin

 

posted @ 2017-12-18 20:56  luchuangao  阅读(927)  评论(0编辑  收藏  举报