Monday, June 9, 2014

How to install Flow-tools and Flow-viewer on Centos 5.4

Installing Flow-tools and Flow-viewer on Centos 5.4

Make sure you have the gnu make package installed on your system.
you can check this by using the below command, if not installed install the same using yum install make

#  rpm -qa | grep make

Install dependencies, Download the dependecy package zlib and install it

# wget http://zlib.net/zlib-1.2.8.tar.gz
# tar -xvf zlib-1.2.8.tar.gz
# cd zlib-1.2.8
# ./configure
# make
# make install
# yum install tcp_wrappers

 


Installing flow-tools: Download Latest flow-tools from from https://code.google.com/p/flow-tools/

#  wget https://code.google.com/p/flow-tools/
# tar  -xjvf flow-tools-0.68.5.1.tar.bz2.
# cd flow-tools-0.68.5.1
# ./configure
# make
# make install


Install flow-viewer: Download the latest flow-viewer from http://sourceforge.net/projects/flowviewer/ and Move the flow-viewer files to cgi-bin directory of your server and install the dependencies

# untar FlowViewer_4.4.tar
# mv FlowViewer_4.4 /var/www/cgi-bin/flowviewer
# yum install gd-devel
# cpan GD
# /usr/bin/make install  -- OK
# cpan GD::Graph
# yum install rrdtool
# cd /var/www/cgi-bin/flowviewer/tools

Move flow-capture-table.conf to /etc/flow-capture-table.conf
Edit the file with the your router ip address and port number.

# mv /var/www/cgi-bin/flowviewer/tools/flowcapture_restart /etc/init.d/flowcapture

edit the /etc/init.d/flowcapture file and make sure the below paths are mentioned correctly and have the valid path.

# USER=root
# RRDTOOL_PATH=/usr/bin
# FLOW_CAPTURE_TABLE=/var/flow-tools/flow-capture-table.conf
# FLOW_CAPTURE_BIN=/usr/bin/flow-capture
# FLOW_CAPTURE_PID_DIR=/var/run/flow-capture.pid

# cd /var/www/cgi-bin/flowviewer/tools/
# mv flowtracker_restart /etc/init.d/flowtracker

Make sure the below paths are correct in the flowtracker file

FlowViewer=/var/www/cgi-bin/flowviewer
user=root
RRDTOOL_PATH=/usr/bin

Start the Flow-viewer and flow-tracker

# /etc/init.d/flow-capture start
# /etc/init.d/flow-tracker start

Point your web brouser to the below url (replace the ip address with your server ip).

https://192.168.1.1/cgi-bin/flowviewer/FlowViewer.cgi


You are done installing a great netflow tool. Enjoy!!!


P.S: Use http://ipsubnetcalculator.net/  for calculating IP subnet mask Online

4 comments:

  1. Followed the same. Able to Install it. Great Document.

    ReplyDelete
  2. Hi there,

    I stumbled upon your guide because I need to install flow-tools on a centOS for another tool.

    Unfortunately, it did not work out for me: I followed your description for installing zlib dependencies and flow-tools but when I call my tool this error rises:

    error while loading shared libraries: libft.so.0: cannot open shared object file: No such file or directory

    I found flow-tools to be installed in /usr/local/flow-tools
    So I tried: export LD_LIBRARY_PATH=/usr/local/flow-tools/:$LD_LIBRARY_PATH
    But still, there is the error message that libft.so.0 cannot be found.

    I'm sorry to bother you with my personal problems but I hope, maybe, you could give me a hint or even know this error from your experience?

    ReplyDelete
  3. Unfortunately there were many issues during the installation following this document. There were many prerequisites that were not mentioned, file paths seem to change mid-document (i.e. /var/www/cgi-bin/FlowViewer_4.4 is being referenced as /var/www/cgi-bin/flowviewer later on). Stuff like 'flowtracker_restart' doesn't exist.

    If the author has time, starting the tutorial over on a fresh CentOS 6.6 installation would be nice. There was just no way to follow the guide (even loosely) and be successful.

    ReplyDelete
    Replies
    1. This installtion is done on Centos 5.4, if you are trying on Centos 6.5 Then there might be some dependency issue. I am creating a new doc for the Installtion in Centos 6.5 . I will post the link

      Delete