1. 程式人生 > >2天時間終於把ntopng裝好了

2天時間終於把ntopng裝好了

ras etc 安裝 stack rom 服務 gre 密碼 works

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

2天時間終於把ntopng裝好了