網絡監控 ntopng centos6.4 64位安裝

centos6.4 64位 ntopng安裝


1、配置默認yum源

    實驗使用阿里的鏡像

    1、備份

    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.def

    2、下載新的CentOS-Base.repo 到/etc/yum.repos.d/

    CentOS 5

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

    CentOS 6

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

    3、之後運行yum makecache生成緩存

2、安裝epel源及給國內鏡像

    1、下載安裝

    wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

    chmod u+x epel-release-6-8.noarch.rpm

    rpm -ivh epel-release-6-8.noarch.rpm

    2、備份(如有配置其他epel源)

    mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup

    mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup

    3、下載新repo 到/etc/yum.repos.d/

    epel(RHEL 6)

    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo

3、安裝依賴庫

    yum install libpcap-devel glib2-devel GeoIP GeoIP-devel libxml2-devel libxml2-devel redis wget rrdtool

    下載安裝libzmq3,網站爲:http://rpm.pbone.net/index.php3/stat/4/idpl/23532429/dir/centos_6/com/libzmq3-3.2.2-5.1.x86_64.rpm.html

    wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/jblunck:/messaging/CentOS_CentOS-6/x86_64/libzmq3-3.2.2-5.1.x86_64.rpm

    chmod u+x libzmq3-3.2.2-5.1.x86_64.rpm

    rpm -ivh libzmq3-3.2.2-5.1.x86_64.rpm

    解決如下出錯:

    [root@net1 ~]# rpm -ivh ntopng-1.2.2-8420.x86_64.rpm 

    warning: ntopng-1.2.2-8420.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7921df34: NOKEY

    error: Failed dependencies:

        librrd.so.4()(64bit) is needed by ntopng-1.2.2-8420.x86_64

        libzmq.so.3()(64bit) is needed by ntopng-1.2.2-8420.x86_64

        rrdtool >= 1.3.8 is needed by ntopng-1.2.2-8420.x86_64

4、安裝及配置ntopng

    1、下載

    網站 :http://www.nmon.net/packages/rpm/x86_64/

    wget http://www.nmon.net/packages/rpm/x86_64/ntopng/ntopng-1.2.2-8420.x86_64.rpm

    wget http://www.nmon.net/packages/rpm/x86_64/ntopng-data/ntopng-data-1.2.2-8420.noarch.rpm

    2、安裝

    chmod u+x ntopng-1.2.2-8420.x86_64.rpm ntopng-data-1.2.2-8420.noarch.rpm

    rpm -ivh ntopng-1.2.2-8420.x86_64.rpm

    rpm -ivh ntopng-data-1.2.2-8420.noarch.rpm

5、配置ntopng

    1、查看默認配置文件

    [root@net1 ~]# cd /etc/ntopng/

    [root@net1 ntopng]# ls

    ntopng.conf.sample ntopng.start

    注,ntopng.conf.sample  文件是配置文件樣例,ntopng.start是ntopng啓動時需要的配置文件(測試的ntopng版本此文件爲空)。

    [root@net1 ntopng]# cat ntopng.conf.sample

    -G=/var/tmp/ntopng.gid

    注,-G指定運行所用進程號文件。

    修改後的內容爲:

    [root@net1 ntopng]# cat ntopng.conf

    -G=/var/tmp/ntopng.pid

    --local-networks "10.1.1.0/24"

    --interface eth1

    --user nobody

    --http-port 8888

    注,--local-network "指定本地子網段"; --interface eth1 指定監聽eth1網卡上的流量; --user z指定ntopng運行時使用的賬戶爲nobody; --http-port 指定web服務端口爲8888,如果不指定默認爲3000。

6、啓動ntopng

    注,在運行ntopng之前,要確認先啓動redis服務,redis爲ntopng提供鍵值存儲。我們這邊重新啓動一下redis服務。

    service redis start

    service ntopng start

7、測試訪問一下

    http://IP:8888

    默認的用戶名和密碼是admin。



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章