Nfsen

    版本為 10:40, 30 Nov 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    安裝基本工具

    - http://repoforge.org/use/

    wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
    rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
    yum install httpd php php-gd php-mbstring php-mysql perl-rrdtool rrdtool rrdtool-devel rrdutils flex byacc perl-Socket6 perl-MailTools perl-Mail-Sender gcc gcc-c++ kernel-devel perl-core
    

    安裝 Nfdump

    cd /usr/local/src/
    wget https://sourceforge.net/projects/nfdump/files/stable/nfdump-1.6.13/nfdump-1.6.13.tar.gz/download
    tar zxvf nfdump-1.6.13.tar.gz
    cd nfdump-1.6.13/
    ./configure --enable-nfprofile --with-rrdpath=/usr/bin
    make
    make install
    

    安裝 Nfsen

    cd /usr/local/src/
    wget https://sourceforge.net/projects/nfsen/files/stable/nfsen-1.3.6p1/nfsen-1.3.6p1.tar.gz/download
    tar zxvf nfsen-1.3.6p1.tar.gz
    cd nfsen-1.3.6p1/
    cp etc/nfsen-dist.conf etc/nfsen.conf
    vi etc/nfsen.conf
    
    $BASEDIR = "/usr/local/nfsen";                  #第21行
    $HTMLDIR    = "/var/www/html/nfsen/";   #第39行
    $USER    = "apache";                                    #第91行   
    $WWWUSER  = "apache";                          #第95行
    $WWWGROUP = "apache";                       #第96行
    
    #新增flow設備 #第162行
    #(RouterBoard用udp 9995送出給主機接收,不同的設備設定不同的udp port)
    %sources = (
        'device1'    => { 'port' => '9995', 'col' => '#0000ff', 'type' => 'netflow' },
        'device2'    => { 'port' => '9996', 'col' => '#00ff00', 'type' => 'netflow' },
        'device3'    => { 'port' => '9997', 'col' => '#ffff00', 'type' => 'netflow' },
    );
    

    開始安裝

    mkdir -p /usr/local/nfsen
    ./install.pl etc/nfsen.conf
    

    Perl to use: [/usr/bin/perl] <ENTER>

    設定 php.ini

    sed -i  's/;date\.timezone =.*/date\.timezone = \"Asia\/Taipei\"/g' /etc/php.ini
    

    啟動 Nfsen

    /usr/local/nfsen/bin/nfsen start
    service httpd restart
    chkconfig httpd on 
    

    測試 Web

    http://<server.ip.address>/nfsen/nfsen.php

     

    FAQ

    Question: Can't use string ("live") as a HASH ref while "strict refs" in use at libexec/NfProfile.pm line 1238

    Solution: Install version 1.3.6p1 instead of 1.3.7

    Change logs from 1.3.6p1 to 1.3.7)
    - Fix various incompatibilities with newer php and Perl versions
    - Fix empty details graph, if too many channels or resources were selected.
    - Fix argument bug in selecting the dstmac statistics
    - Fix bug in create history profiles: compression flag was not applied properly
    - Add periodic reload feature for Perls with mem leak.
     

    Powered by MindTouch Core