接到领导通知要查看三台节点的网卡带宽,于是在网上找了下,发现ntopng这个东东还挺不错的。
搭的时候发现各种缺库却环境,坑的一逼。搭建完毕之后坐我旁边的几个小伙伴老大说只要个带宽峰值就行,蛋疼=。=,早知道直接搞个脚本就行了。
搭建过程如下:
##############################
wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm
##############################
yum install -y GeoIP-devel
yum install -y libpcap-devel glib2-devel libxml2-devel libxml2-devel
yum install -y autoconf automake libtool libtoolize autoreconf
yum install -y sqlite-devel
yum install -y libcurl*
yum -y install mysql++-devel.x86_64 mysql-devel.x86_64 mysql-embedded-devel.x86_64 mysql-proxy-devel.x86_64 soci-mysql-devel.x86_64 libodb-mysql-devel.x86_64
##############################
yum install redis
service redis start
###########################
#github上的版本为ntopng社区版#
###########################
yum install git
git clone https://github.com/ntop/nDPI.git
cd nDPI/
./autogen.sh
make
cd ..
git clone https://github.com/ntop/ntopng.git
./autogen.sh
./configure
make geoip
make
make install
##############################
cd /etc/
mkdir ntopng
vim ntopng.configure
-G=/var/tmp/ntopng.gid
--local-networks=192.168.10.0/24
--interface=em1
--user=nobody
--http-port=3000
##############################
nohup /usr/local/bin/ntopng /etc/ntopng/ntopng.conf &
web界面登录方式http://ip:port 默认密码为admin,admin
##############################
登录密码修改
redis cli模式下修改ntopng.user.admin.password
然后重启ntopng