yum install -y git autoconf automake gmake
yum install -y libcurl-devel
yum install sqlite sqlite-devel
yum install libtool
02、安装redis
官网:https://redis.io/
rpm -ivh redis-2.4.10-1.el6.x86_64.rpm
配置:/etc/redis.conf
service redis start
[root@100-lab nt]# ss -ln
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 127.0.0.1:6379 *:*
LISTEN 0 128 :::22 :::*
LISTEN 0 128 *:22 *:*
LISTEN 0 100 ::1:25 :::*
LISTEN 0 100 127.0.0.1:25 *:*
03、编译ntopng
官网:http://www.ntop.org/products/traffic-analysis/ntop/
ntopng-2.2.tar.gz
下载:http://pan.baidu.com/s/1dEJnzUD
解压 tar zxf ntopng-2.2.tar.gz
./autogen.sh #编译git,生成configure
./configure #
./gmake #编译
make install #安装 /usr/local/ntopng
04、配置文件
vim /etc/ntopng.conf
#进程号
-G=/var/tmp/ntopng.gid
指定监听本地的哪些网段
–local-networks=192.168.100.0/24,192.168.200.0/24
指定监听哪张网卡
–interface=eth0
指定监听哪个http端口,用于web管理
–user=root
–http-port=3000 #http://ip:3000 认证用户admin/admin
05、启动ntopng
/etc/rc.d/init.d/redis start
启动redis
/usr/local/bin/ntopng /etc/ntopng/ntopng.conf &
启动ntopng并在后台运行
访问http://192.168.100.166:3000/,输入默认用户名和密码admin admin
06、错误解决
00:
[root@100-lab ntopng-2.2]# ./autogen.sh
./autogen.sh: line 11: git: command not found
./autogen.sh: line 14: git: command not found
Wait please...
./autogen.sh: line 35: autoreconf: command not found
[root@100-lab ntopng-2.2]# ./autogen.sh
Wait please...
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm lin
e 326.autoreconf: failed to run aclocal: No such file or directory
checking for sqlite3_open in -lsqlite3... no
#解决方案
yum install sqlite sqlite-devel
yum install -y git autoconf automake gmake
附上相关网站:
http://www.ntop.org/get-started/download/ #官网
https://github.com/ntop/ntopng #官方github
http://packages.ntop.org/ #根据平台打压的包
http://rpmfind.net
redis-rpm
https://centos.pkgs.org/6/epel-x86_64/redis-2.4.10-1.el6.x86_64.rpm.html
07、附上RPM安装
[root@100-lab ~]# rpm -ivh ntopng-3.1.170607-2895.x86_64.rpm #根据相关缺少包,以此安装
warning: ntopng-3.1.170607-2895.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID d1eb60be: NOKEY
error: Failed dependencies:
pfring = 6.7.0-1255 is needed by ntopng-3.1.170607-2895.x86_64
redis >= 2.4.0 is needed by ntopng-3.1.170607-2895.x86_64
GeoIP >= 1.4.8 is needed by ntopng-3.1.170607-2895.x86_64
rrdtool >= 1.3.8 is needed by ntopng-3.1.170607-2895.x86_64
numactl is needed by ntopng-3.1.170607-2895.x86_64
ntopng-data is needed by ntopng-3.1.170607-2895.x86_64
zeromq >= 4.0.0 is needed by ntopng-3.1.170607-2895.x86_64
hiredis is needed by ntopng-3.1.170607-2895.x86_64
mysql is needed by ntopng-3.1.170607-2895.x86_64
libnetfilter_queue is needed by ntopng-3.1.170607-2895.x86_64
bridge-utils is needed by ntopng-3.1.170607-2895.x86_64
#借鉴别人的,嘻嘻
##############################
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
在centos6.x系统下安装最新版本的ntopng服务的步骤:
cd /etc/yum.repos.d/
* ```
`wget http://packages.ntop.org/centos/ntop.repo -O ntop.repo`
wget http://packages.ntop.org/centos/epel-6.repo -O epel.repo
* ```
`wget <https://copr.fedoraproject.org/coprs/saltstack/zeromq4/repo/epel-6/saltstack-zeromq4-epel-6.repo>`
yum erase zeromq3
![img](https://img-blog.csdnimg.cn/img_convert/f2aca3b1c8af84801e38cd8f9c121fd0.png)
![img](https://img-blog.csdnimg.cn/img_convert/8ddc5552e735538c38c09380b6d582c8.png)
**网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**
**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**
m erase zeromq3`
[外链图片转存中…(img-Bz3hvIiZ-1719231654381)]
[外链图片转存中…(img-EF6NUOc6-1719231654382)]
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!