#yum install freetype freetype-devel zlib-devel libpng-devel php php-gd gd gd-devel perl httpd
Install Module
#cpan
#install GD
#install GD::Graph
#install GD::Text
Download flow-tools GD and GD::Graph
#cd /usr/local/src
#wget ftp://195.220.108.108/linux/epel/5/x86_64/flow-tools-0.68.5-1.el5.x86_64.rpm
#wget http://search.cpan.org/CPAN/authors/id/L/LD/LDS/GD-2.45.tar.gz
#wget http://search.cpan.org/CPAN/authors/id/B/BW/BWARFIELD/GDGraph-1.44.tar.gz
#useradd flow-tools
#rpm -ivh flow-tools-0.68.5-1.el5.x86_64.rpm –-nodeps
#tar –xf GD-2.45.tar.gz
#cd GD-2.45
#perl Makefile.PL
#make
#make install
#tar –xf GDGraph-1.44.tar.gz
#cd GDGraph-1.44
#perl Makefile.PL
#make
#make install
Install rrdtool
#vi /etc/yum.repos/dag.repo
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
enabled=1
# yum install rrdtool rrdtool-devel ruby-rrdtool
Configure flow-tools
#cd /etc/sysconfig/
#vi flow-capture
flow-capture -V 5 -E 5G -N 3 -w /var/flows/ROUTER 0.0.0.0/10.1.1.90/2055
#vi /etc/init.d/flow-capture
# Add pidfile
OPTIONS="-p /var/flow-tools/flow-capture.pid $OPTIONS"
#cd /var/
#chmod 777 flow-tools
#mkdir –p /var/flow/ROUTER
#/etc/init.d/flow-capture restart
#/etc/init.d/flow-capture status
Download FlowViewer & Installation
#cd /usr/local/src
#wget http://ensight.eos.nasa.gov/FlowViewer/FlowViewer_3.3.1.tar
#tar -xf FlowViewer_3.3.1.tar
#mv FlowViewer_3.3.1 /var/www/cgi-bin/
#cd /var/www/cgi-bin
#chmod 0777 *
#cd FlowViewer_3.3.1
# vi FlowViewer_Configuration.pm
###########################################################################
#
# BEGIN EXECUTABLE STATEMENTS
#
# Path variable
$ENV{PATH} .= ':/usr/local/bin:/usr/sbin';
# Server
$FlowViewer_server = "100.100.100.10"; # (IP address or hostname)
# Service
$FlowViewer_service = "http"; # (http, or https)
# Directories and Files:
$reports_directory = "/var/www/FlowViewer";
$reports_short = "/FlowViewer";
$graphs_directory = "/var/www/FlowGrapher";
$graphs_short = "/FlowGrapher";
$tracker_directory = "/var/www/FlowTracker";
$tracker_short = "/FlowTracker";
$cgi_bin_directory = "/var/www/cgi-bin/FlowViewer_3.3.1";
$cgi_bin_short = "/cgi-bin/FlowViewer_3.3.1";
$work_directory = "/var/www/cgi-bin/FlowViewer_3.3.1/Flow_Working";
$work_short = "/cgi-bin/FlowViewer_3.3.1/Flow_Working";
$save_directory = "/var/www/FlowViewer_Saves";
$save_short = "/FlowViewer_Saves";
$names_directory = "/var/www/cgi-bin/FlowViewer_3.3.1";
$filter_directory = "/var/www/cgi-bin/FlowViewer_3.3.1/FlowTracker_Files/FlowTracker_Filters";
$rrdtool_directory = "/var/www/cgi-bin/FlowViewer_3.3.1/FlowTracker_Files/FlowTracker_RRDtool";
$flow_data_directory = "/var/flows";
$exporter_directory = "/var/flows/all_routers";
$flow_bin_directory = "/usr/bin";
$rrdtool_bin_directory = "/usr/bin";
$actives_webpage = "index.html";
$trackings_title = "FlowViewer Saves";
$user_logo = "Generic_Logo.jpg"; # For a nice look make your logo 86 pixels high
$user_hyperlink = "/FlowViewer_Saves";
# General parameters
$version = "3.3.1";
$no_devices_or_exporters = "N";
@devices = ("ROUTER");
#@exporters = ("192.168.100.1:New York Router","192.168.100.2:Prague Router");
$flow_capture_interval = (30 * 60);
$flow_file_length = (15 * 60);
$start_offset = (90 * 60); # e.g., 90 minutes ago
$end_offset = (30 * 60); # e.g., 30 minutes ago
$use_even_hours = "Y";
$N = 3;
$use_NDBM = "N";
$pie_chart_default = 0; # 0 = None; 1 = With Others; 2 = Without Others
$number_slices = 6;
$maximum_days = "91";
$remove_workfiles_time = 86400;
$remove_graphfiles_time = 7*86400;
$remove_reportfiles_time = 7*86400;
$time_zone = ""; # If left empty, will use system time zone
$labels_in_titles = "1"; # Set to "1" for labels in Tracker graph titles; "0" off
# Tracking parameters
$log_directory = "/var/www/cgi-bin/FlowViewer_3.3.1";
#for d in `cat FlowViewer_Configuration.pm | grep directory | awk -F \" '{print $2}'`; do mkdir -p $d/; done
#for d in `cat FlowViewer_Configuration.pm | grep directory | awk -F \" '{print $2}'`; do chmod -R a=rwx $d/; done
#cp Generic_Logo.jpg /var/www/FlowViewer/
#cp FlowViewer_Save.png /var/www/FlowViewer/
#cp FlowViewer.png /var/www/FlowViewer_Saves/
#cp FlowViewer_Save.png /var/www/FlowViewer_Saves/
Configure FlowTracker
#cd /var/www/cgi-bin/FlowViewer_3.3.1
#vi flowcap
#!/bin/sh
#
# FlowTracker: Starts all processes concerning FlowTracker
#
# description: This script starts up the the FlowTracker tools (Collector and Grapher)
#
# processname: There is not a single process associated with these
# actions, rather there are multiple processes. This
# script takes care of all of them.
#
# can be restarted by using the following command:
#
# sudo /etc/init.d/FlowTracker restart
RETVAL=0
start() {
echo -n $"Starting FlowTracker processes: "
echo -n "FlowTracker_Collector "
cd /var/www/cgi-bin/FlowViewer_3.3.1
./FlowTracker_Collector &> /dev/null &
RETVAL=$?
echo -n "FlowTracker_Grapher "
cd /var/www/cgi-bin/FlowViewer_3.3.1
./FlowTracker_Grapher &> /dev/null &
RETVAL=$?
echo ""
}
stop() {
echo -n $"Stopping FlowTracker processes: "
RETVAL=0
for p in `pidof perl`
do
ps $p | grep FlowTracker_Collector > /dev/null
if [ $? -eq 0 ]; then
echo -n "FlowTracker_Collector "
kill $p
fi
ps $p | grep FlowTracker_Grapher > /dev/null
if [ $? -eq 0 ]; then
echo -n "FlowTracker_Grapher "
kill $p
fi
done
echo ""
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
;;
esac
exit $RETVAL
#mv flowcap /etc/init.d/FlowTracker
#chmod a+x /etc/init.d/FlowTracker
#vi /etc/cron.d/FlowTracker
## m h dom mon dow user command
5 0 * * * /var/www/cgi-bin/FlowViewer_3.3.1/FlowTracker_Collector &> /dev/null &
5 0 * * * /var/www/cgi-bin/FlowViewer_3.3.1/FlowTracker_Grapher &> /dev/null &
#/etc/init.d/crond restart
#/etc/init.d/FlowTracker restart
#/etc/init.d/httpd restart
To check process FlowTracker
#ps –ax | grep Flow
Simply point your browser at http://your_server_IP_address/cgi-bin/FlowViewer_3.3.1/FlowViewer.cgi
Install Module
#cpan
#install GD
#install GD::Graph
#install GD::Text
Download flow-tools GD and GD::Graph
#cd /usr/local/src
#wget ftp://195.220.108.108/linux/epel/5/x86_64/flow-tools-0.68.5-1.el5.x86_64.rpm
#wget http://search.cpan.org/CPAN/authors/id/L/LD/LDS/GD-2.45.tar.gz
#wget http://search.cpan.org/CPAN/authors/id/B/BW/BWARFIELD/GDGraph-1.44.tar.gz
#useradd flow-tools
#rpm -ivh flow-tools-0.68.5-1.el5.x86_64.rpm –-nodeps
#tar –xf GD-2.45.tar.gz
#cd GD-2.45
#perl Makefile.PL
#make
#make install
#tar –xf GDGraph-1.44.tar.gz
#cd GDGraph-1.44
#perl Makefile.PL
#make
#make install
Install rrdtool
#vi /etc/yum.repos/dag.repo
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
enabled=1
# yum install rrdtool rrdtool-devel ruby-rrdtool
Configure flow-tools
#cd /etc/sysconfig/
#vi flow-capture
flow-capture -V 5 -E 5G -N 3 -w /var/flows/ROUTER 0.0.0.0/10.1.1.90/2055
#vi /etc/init.d/flow-capture
# Add pidfile
OPTIONS="-p /var/flow-tools/flow-capture.pid $OPTIONS"
#cd /var/
#chmod 777 flow-tools
#mkdir –p /var/flow/ROUTER
#/etc/init.d/flow-capture restart
#/etc/init.d/flow-capture status
Download FlowViewer & Installation
#cd /usr/local/src
#wget http://ensight.eos.nasa.gov/FlowViewer/FlowViewer_3.3.1.tar
#tar -xf FlowViewer_3.3.1.tar
#mv FlowViewer_3.3.1 /var/www/cgi-bin/
#cd /var/www/cgi-bin
#chmod 0777 *
#cd FlowViewer_3.3.1
# vi FlowViewer_Configuration.pm
###########################################################################
#
# BEGIN EXECUTABLE STATEMENTS
#
# Path variable
$ENV{PATH} .= ':/usr/local/bin:/usr/sbin';
# Server
$FlowViewer_server = "100.100.100.10"; # (IP address or hostname)
# Service
$FlowViewer_service = "http"; # (http, or https)
# Directories and Files:
$reports_directory = "/var/www/FlowViewer";
$reports_short = "/FlowViewer";
$graphs_directory = "/var/www/FlowGrapher";
$graphs_short = "/FlowGrapher";
$tracker_directory = "/var/www/FlowTracker";
$tracker_short = "/FlowTracker";
$cgi_bin_directory = "/var/www/cgi-bin/FlowViewer_3.3.1";
$cgi_bin_short = "/cgi-bin/FlowViewer_3.3.1";
$work_directory = "/var/www/cgi-bin/FlowViewer_3.3.1/Flow_Working";
$work_short = "/cgi-bin/FlowViewer_3.3.1/Flow_Working";
$save_directory = "/var/www/FlowViewer_Saves";
$save_short = "/FlowViewer_Saves";
$names_directory = "/var/www/cgi-bin/FlowViewer_3.3.1";
$filter_directory = "/var/www/cgi-bin/FlowViewer_3.3.1/FlowTracker_Files/FlowTracker_Filters";
$rrdtool_directory = "/var/www/cgi-bin/FlowViewer_3.3.1/FlowTracker_Files/FlowTracker_RRDtool";
$flow_data_directory = "/var/flows";
$exporter_directory = "/var/flows/all_routers";
$flow_bin_directory = "/usr/bin";
$rrdtool_bin_directory = "/usr/bin";
$actives_webpage = "index.html";
$trackings_title = "FlowViewer Saves";
$user_logo = "Generic_Logo.jpg"; # For a nice look make your logo 86 pixels high
$user_hyperlink = "/FlowViewer_Saves";
# General parameters
$version = "3.3.1";
$no_devices_or_exporters = "N";
@devices = ("ROUTER");
#@exporters = ("192.168.100.1:New York Router","192.168.100.2:Prague Router");
$flow_capture_interval = (30 * 60);
$flow_file_length = (15 * 60);
$start_offset = (90 * 60); # e.g., 90 minutes ago
$end_offset = (30 * 60); # e.g., 30 minutes ago
$use_even_hours = "Y";
$N = 3;
$use_NDBM = "N";
$pie_chart_default = 0; # 0 = None; 1 = With Others; 2 = Without Others
$number_slices = 6;
$maximum_days = "91";
$remove_workfiles_time = 86400;
$remove_graphfiles_time = 7*86400;
$remove_reportfiles_time = 7*86400;
$time_zone = ""; # If left empty, will use system time zone
$labels_in_titles = "1"; # Set to "1" for labels in Tracker graph titles; "0" off
# Tracking parameters
$log_directory = "/var/www/cgi-bin/FlowViewer_3.3.1";
#for d in `cat FlowViewer_Configuration.pm | grep directory | awk -F \" '{print $2}'`; do mkdir -p $d/; done
#for d in `cat FlowViewer_Configuration.pm | grep directory | awk -F \" '{print $2}'`; do chmod -R a=rwx $d/; done
#cp Generic_Logo.jpg /var/www/FlowViewer/
#cp FlowViewer_Save.png /var/www/FlowViewer/
#cp FlowViewer.png /var/www/FlowViewer_Saves/
#cp FlowViewer_Save.png /var/www/FlowViewer_Saves/
Configure FlowTracker
#cd /var/www/cgi-bin/FlowViewer_3.3.1
#vi flowcap
#!/bin/sh
#
# FlowTracker: Starts all processes concerning FlowTracker
#
# description: This script starts up the the FlowTracker tools (Collector and Grapher)
#
# processname: There is not a single process associated with these
# actions, rather there are multiple processes. This
# script takes care of all of them.
#
# can be restarted by using the following command:
#
# sudo /etc/init.d/FlowTracker restart
RETVAL=0
start() {
echo -n $"Starting FlowTracker processes: "
echo -n "FlowTracker_Collector "
cd /var/www/cgi-bin/FlowViewer_3.3.1
./FlowTracker_Collector &> /dev/null &
RETVAL=$?
echo -n "FlowTracker_Grapher "
cd /var/www/cgi-bin/FlowViewer_3.3.1
./FlowTracker_Grapher &> /dev/null &
RETVAL=$?
echo ""
}
stop() {
echo -n $"Stopping FlowTracker processes: "
RETVAL=0
for p in `pidof perl`
do
ps $p | grep FlowTracker_Collector > /dev/null
if [ $? -eq 0 ]; then
echo -n "FlowTracker_Collector "
kill $p
fi
ps $p | grep FlowTracker_Grapher > /dev/null
if [ $? -eq 0 ]; then
echo -n "FlowTracker_Grapher "
kill $p
fi
done
echo ""
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
;;
esac
exit $RETVAL
#mv flowcap /etc/init.d/FlowTracker
#chmod a+x /etc/init.d/FlowTracker
#vi /etc/cron.d/FlowTracker
## m h dom mon dow user command
5 0 * * * /var/www/cgi-bin/FlowViewer_3.3.1/FlowTracker_Collector &> /dev/null &
5 0 * * * /var/www/cgi-bin/FlowViewer_3.3.1/FlowTracker_Grapher &> /dev/null &
#/etc/init.d/crond restart
#/etc/init.d/FlowTracker restart
#/etc/init.d/httpd restart
To check process FlowTracker
#ps –ax | grep Flow
Simply point your browser at http://your_server_IP_address/cgi-bin/FlowViewer_3.3.1/FlowViewer.cgi