准备环境
CentOS6.4 和ntopng-1.2.1.tgz下载 提取码:2142 首先换为国内的源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
yum update
yum install gcc gcc-c++ -y #配置gcc环境
#下载安装 EPEL 安装源
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 groupinstall "Development Tools"
#这里存在报错 Error: Package: perl-Git-1.8.2.3-1.el5.x86_64 (epel)通过下面的命令解决
wget http://mirror.umd.edu/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
yum remove epel-release
rpm -ivh epel-release-6-8.noarch.rpm --test
rpm -ivh epel-release-6-8.noarch.rpm
yum update
yum install libpcap-devel glib2-devel GeoIP-devel libxml2-devel redis autoconf automake sqlite-devel 安装必要的包
rz #上传我们开始下载的ntopng-1.2.1.tgz包解压
cd ntopng-1.2.1
./autogen.sh
make&make install
编写配置文件
[root@host-10-0-10-16 ntopng-1.2.1]# mkdir /etc/ntopng
[root@host-10-0-10-16 ntopng-1.2.1]# vim /etc/ntopng/ntopng.conf
-G=/var/tmp/ntopng.pid
--local-networks=10.0.10.0/24
--interface=eth0
--http-port=3000
[root@host-10-0-10-16 ntopng-1.2.1]# /etc/init.d/redis start #先启动redis
Starting redis-server: [ OK ]
[root@host-10-0-10-16 ntopng-1.2.1]# /usr/local/bin/ntopng /etc/ntopng/ntopng.conf & #在启动ntopng
lsof -i :3000 #检查服务
登陆
http://192.168.1.208:3000
Username: admin
Password : admin