- http://sourceforge.net/projects/libnfdump/
cd /usr/local/src wget https://sourceforge.net/projects/libnfdump/files/libnfdump-0.1.1.tar.gz/download tar xzf libnfdump-0.1.1.tar.gz cd libnfdump-0.1.1/ ./configure --prefix=/usr --libdir=/usr/lib64 make make install ldconfig
- https://sourceforge.net/projects/hoststats
wget http://sourceforge.net/projects/hoststats/files/hoststats-1.1.5.tar.gz tar zxf hoststats-1.1.5.tar.gz cd hoststats-1.1.5 ./configure make make install
重啟 Nfsen
/usr/local/nfsen/bin/nfsen reload
vi /data/hoststats/hoststats.conf
依需求調整顯示Filter設定
profiles = all,ssh,http,https,TCP,UDP all:filter = any all:max-size = 10G all:color = 008DFF ssh:filter = proto TCP and port 22 ssh:max-size = 5G ssh:color = CCBB00 http:filter = proto TCP and port 80 http:max-size = 5G http:color = FF00BB https:filter = proto TCP and port 443 https:max-size = 5G https:color = 009F67 TCP:filter = proto TCP TCP:max-size = 5G TCP:color = FF5700 UDP:filter = proto UDP UDP:max-size = 5G UDP:color = 8D00BA
依需求調整%source的變數
flow-data-path = /usr/local/nfsen/profiles-data/live/%source/%y/%m/%d/nfcapd.%y%m%d%H%M
存檔離開,接著輸入下面指令
chown apache.apache -R /data/hoststats sudo -u apache /data/hoststats/hoststats start
開機自動啟動服務
vi /etc/rc.local
/usr/local/nfsen/bin/nfsen start sudo -u apache /data/hoststats/hoststats start
Images 0 | ||
---|---|---|
No images to display in the gallery. |