1、环境centos6.7x64
2、安装步骤,首先把centos按优化步骤完成
3、更改centos的yum源,更改为阿里云的源。
4、
[[email protected] ntopng]# cat /etc/yum.repos.d/ntop.repo
[ntop]
name=ntop packages
baseurl=http://packages.ntop.org/centos-stable/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://packages.ntop.org/centos-stable/RPM-GPG-KEY-deri
[ntop-noarch]
name=ntop packages
baseurl=http://packages.ntop.org/centos-stable/$releasever/noarch/
enabled=1
gpgcheck=1
gpgkey=http://packages.ntop.org/centos-stable/RPM-GPG-KEY-deri
5、
[[email protected] ntopng]# cat /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
6、cd /etc/yum.repos.d/
wget https://copr.fedoraproject.org/coprs/saltstack/zeromq4/repo/epel-6/saltstack-zeromq4-epel-6.repo
yum erase zeromq3
(Do this once to make sure zeromq3 is not installed)yum clean all
yum update
yum install pfring n2disk nprobe ntopng ntopng-data nbox
- (这里如果安装太慢,可以到官网把rpm包下载来,然后yum install rpm包的方式来安装,下载地址http://packages.ntop.org/centos-stable/,
- http://packages.ntop.org/centos-stable/6/noarch/Packages/,
- http://packages.ntop.org/centos-stable/6/x86_64/)
- 一共涉及到6个rpm包,yum install n2disk-2.3.151021-4451.x86_64.rpm ntopng-2.0.151021-213.x86_64.rpm nprobe-7.2.151021-4468.x86_64.rpm ntopng-data-2.0.151021-213.noarch.rpm nprobe-dev-7.2.151021-4468.x86_64.rpm pfring-6.0.3-308.x86_64.rpm ,把这六个包都本地安装完毕以后,再执行一次
yum install pfring n2disk nprobe ntopng ntopng-data nbox
就OK了。如果本地安装KEY检查报错。可以将(第二种是修改repo文件
vim /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 6 – $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6把gpgcheck=1改为gpgcheck=0)
PF_RING is now packaged without ZC/DNA drivers. You can choose what family you want to install
- ZC:
yum install pfring-drivers-zc-dkms
- DNA:
yum install pfring-drivers-dna-dkms
7、yum install openssl-devel 一定要装这个SSL服务。我一开始搞了半天不行。就少了这个!
8、安装完毕以后,首先修改下ntopng的配置文件vi /etc/ntopng/ntopng.conf
[[email protected] ntopng]# cat ntopng.conf
-G=/var/tmp/ntopng.pid
--local-networks "192.168.0.0/24"
--interface eth1
注意这里第一个是PID文件,第二个是本地网段,第三个你想分析监控哪个网卡。
然后 cp ntopng.conf ntopng.start,这两个配置文件是一样的。
9、启动服务的顺序
首先启动 /etc/init.d/redis start
10、启动/etc/init.d/ntopng start
访问地址为IP:3000,默认用户名密码都是admin
确认下:
[[email protected] ntopng]# chkconfig --list|grep "3:on"
cluster 0:off 1:off 2:on 3:on 4:on 5:on 6:off
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
dkms_autoinstaller 0:off 1:off 2:on 3:on 4:on 5:on 6:off
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
n2disk 0:off 1:off 2:on 3:on 4:on 5:on 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
nprobe 0:off 1:off 2:on 3:on 4:on 5:on 6:off
ntopng 0:off 1:off 2:on 3:on 4:on 5:on 6:off
pf_ring 0:off 1:off 2:on 3:on 4:on 5:on 6:off
redis 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rsyslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
vmware-tools 0:off 1:off 2:on 3:on 4:off 5:on 6:off
redis和ntopng服务开始是否是启动的。
参考文章:
http://daviwa.blogspot.jp/2014/02/ntopng-how-to-install-ntopng-on-centos.html