Sniffer installation: Difference between revisions

From VoIPmonitor.org
Jump to navigation Jump to search
 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
VoIP monitor sniffer can be installed in two ways - either as static binary which will run on any Linux distribution with kernels >= 2.6.18 or compiled from sources.  
VoIP monitor sniffer can be installed in two ways - either as static binary which will run on any Linux distribution with kernels >= 2.6.18 or compiled from sources.  


= Static binary =
= Latest Static binary =


Static binary for 32bit or 64bit can be downloaded from http://www.voipmonitor.org/download pages. Step by step for 64bit linux procedure:  
Static binary for 32bit,64bit or Arm arch can be downloaded from http://www.voipmonitor.org/download pages.
 
 
== Step by step for 64bit linux procedure ==
wget https://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz --content-disposition --no-check-certificate
tar xzf voipmonitor-*-static.tar.gz
cd voipmonitor-*-static
./install-script.sh
 
 
== Step by step for 32bit linux procedure ==
wget https://www.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz --content-disposition --no-check-certificate
tar xzf voipmonitor-*-static.tar.gz
cd voipmonitor-*-static
./install-script.sh
 
 
== Step by step for ArmV6(RPI) linux ==
wget https://www.voipmonitor.org/current-stable-sniffer-static-armv6k.tar.gz --content-disposition --no-check-certificate
  tar xzf voipmonitor-*-static.tar.gz
  tar xzf voipmonitor-*-static.tar.gz
  cd voipmonitor-*-static
  cd voipmonitor-*-static
  ./install-script.sh
  ./install-script.sh
  cp voipmonitor.conf /etc/
 
  mysqladmin create voipmonitor
 
  # Now edit configuration file /etc/voipmonitor.conf and run voipmonitor  
 
= Older static versions and versions with SS7(wireshark) module =
If you need for any reason to install older version of a sniffer or version including wireshark's SS7 module follow:
 
 
== Install sniffer version of your choice ==
Find voipmonitor*.tar.gz file of your choice at following site https://sourceforge.net/projects/voipmonitor/files/ and use the link for wget command in step by step [https://wiki.voipmonitor.org/doc/index.php?title=Sniffer_installation&action=submit#Step_by_step_for_64bit_linux_procedure above]
 
=== Example of wget command for version 20.4.4 with ss7(wireshark) module ===
  wget https://sourceforge.net/projects/voipmonitor/files/20.4/voipmonitor-wireshark-amd64-20.4.4-static.tar.gz/download -O voipmonitor-wireshark-amd64-20.4.4-static.tar.gz --content-disposition --no-check-certificate
 
= Newest static versions from develop branch =
 
== Upgrade of a sniffer service step by step 64bit ==
Note: The link and version will be shared by the support team - changes the wget command and cp command which is version specific:
mkdir /tmp/new
cd /tmp/new/
wget https://download.voipmonitor.org/sniffer-develop/build-02921/tarballdevel/voipmonitor-amd64-23.1-static.tar.gz -O ./sniffer.tar.gz
tar -xzf ./sniffer.tar.gz
  cp /usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor.backup
service voipmonitor stop
  cp voipmonitor-amd64-23.1-static/usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor
service voipmonitor start
 
 
 
 
= Configuration of a sniffer =
 
Now edit configuration file /etc/voipmonitor.conf and run voipmonitor  
  /etc/init.d/voipmonitor start
  /etc/init.d/voipmonitor start
= Systemd script for bringing up voipmonitor service at a boot time =
If your system uses systemd for services management create a [https://wiki.voipmonitor.org/doc/Systemd_for_voipmonitor_service_management systemd startup script]


= Compile shared binary =
= Compile shared binary =


== Debian ==  
Please see README.* inside the sources (we recommend to use the static version)
 
git clone -b master https://github.com/voipmonitor/sniffer.git
 
Or develop branch
 
git clone -b develop https://github.com/voipmonitor/sniffer.git
 
= Sniffer uninstallation =


apt-get install build-essential subversion libmysqlclient-dev libvorbis-dev libpcap-dev apache2 php5-mysql php5-gd mysql-server unixodbc-dev
== cleaning script for SysV based systems ==
cd /usr/src
Here is simple cleaning script.
svn co http://svn.code.sf.net/p/voipmonitor/code/trunk voipmonitor-svn
cd voipmonitor-svn
./configure make make install
mkdir /var/spool/voipmonitor
mysqladmin create voipmonitor
cp config/voipmonitor.conf /etc/
#edit file /etc/voipmonitor.conf to your needs
cp config/init.d/voipmonitor /etc/init.d/
update-rc.d voipmonitor defaults
/etc/init.d/voipmonitor start


#!/bin/bash
SHAREDIR=usr/local/share/voipmonitor
AUDIODIR=$SHAREDIR/audio
BINDIR=usr/local/sbin
CFGDIR=etc
INITDIR=$CFGDIR/init.d
SENSOR=voipmonitor
SPOOLDIR=/var/spool/$SENSOR
echo "Stopping $SENSOR"
/$INITDIR/$SENSOR stop
echo "Uninstalling /$SHAREDIR"
rm -rf /$SHAREDIR
echo "Uninstalling $SENSOR binary from /$BINDIR/$SENSOR"
rm /$BINDIR/$SENSOR
echo "Moving /$CFGDIR/$SENSOR.conf to /$CFGDIR/$SENSOR.conf-backup."
mv /$CFGDIR/$SENSOR.conf /$CFGDIR/$SENSOR.conf-backup
echo "Deleting $SPOOLDIR"
rm -rf $SPOOLDIR
update-rc.d $SENSOR remove &>/dev/null
chkconfig $SENSOR off &>/dev/null
chkconfig --del $SENSOR &>/dev/null
echo "Deleting starting script /$INITDIR/$SENSOR"
rm /$INITDIR/$SENSOR
echo;
echo "The database is not deleted. Do it manually.";
echo;


== Centos ==
== cleaning commands for systemd based systems ==
For systemd based OSes use following commands (when chkconfig missing and paths in /etc/voipmonitor.conf kept default)
systemctl disable voipmonitor
rm /usr/local/sbin/voipmonitor
rm /etc/init.d/voipmonitor
rm /etc/voipmonitor.conf
rm -rf /var/spool/voipmonitor


== remove also CDRs? ==
Consider to  drop database, where are CDRs kept in case db used locally and you need to remove it, if db not used there anymore you can also uninstall db(mysql/mariadb) using system commands and remove its datadir /var/lib/mysql
mysqladmin drop database voipmonitor
mysql -e 'drop database voipmonitor'
#systemctl disable mariadb
#rm -rf /varlib/mysql


yum groupinstall 'Development Tools'
= FreeBSD 11 =
yum install subversion libpcap-devel mysql-devel libogg libogg-devel vorbis-tools libvorbis libvorbis-devel mysql-server unixODBC-devel
[[FreeBSD_11]]
svn co http://svn.code.sf.net/p/voipmonitor/code/trunk voipmonitor-svn
cd voipmonitor-svn
./configure
make
make install
mkdir /var/spool/voipmonitor
/etc/init.d/mysqld start
mysqladmin create voipmonitor
cp config/voipmonitor.conf /etc/
#edit file /etc/voipmonitor.conf to your needs
cp config/init.d/voipmonitor /etc/init.d/
chkconfig --add voipmonitor
chkconfig voipmonitor on
/etc/init.d/voipmonitor start

Latest revision as of 14:03, 15 April 2020

VoIP monitor sniffer can be installed in two ways - either as static binary which will run on any Linux distribution with kernels >= 2.6.18 or compiled from sources.

Latest Static binary

Static binary for 32bit,64bit or Arm arch can be downloaded from http://www.voipmonitor.org/download pages.


Step by step for 64bit linux procedure

wget https://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz --content-disposition --no-check-certificate
tar xzf voipmonitor-*-static.tar.gz
cd voipmonitor-*-static
./install-script.sh


Step by step for 32bit linux procedure

wget https://www.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz --content-disposition --no-check-certificate
tar xzf voipmonitor-*-static.tar.gz
cd voipmonitor-*-static
./install-script.sh


Step by step for ArmV6(RPI) linux

wget https://www.voipmonitor.org/current-stable-sniffer-static-armv6k.tar.gz --content-disposition --no-check-certificate
tar xzf voipmonitor-*-static.tar.gz
cd voipmonitor-*-static
./install-script.sh


Older static versions and versions with SS7(wireshark) module

If you need for any reason to install older version of a sniffer or version including wireshark's SS7 module follow:


Install sniffer version of your choice

Find voipmonitor*.tar.gz file of your choice at following site https://sourceforge.net/projects/voipmonitor/files/ and use the link for wget command in step by step above

Example of wget command for version 20.4.4 with ss7(wireshark) module

wget https://sourceforge.net/projects/voipmonitor/files/20.4/voipmonitor-wireshark-amd64-20.4.4-static.tar.gz/download -O voipmonitor-wireshark-amd64-20.4.4-static.tar.gz --content-disposition --no-check-certificate

Newest static versions from develop branch

Upgrade of a sniffer service step by step 64bit

Note: The link and version will be shared by the support team - changes the wget command and cp command which is version specific:

mkdir /tmp/new
cd /tmp/new/
wget https://download.voipmonitor.org/sniffer-develop/build-02921/tarballdevel/voipmonitor-amd64-23.1-static.tar.gz -O ./sniffer.tar.gz
tar -xzf ./sniffer.tar.gz
cp /usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor.backup
service voipmonitor stop
cp voipmonitor-amd64-23.1-static/usr/local/sbin/voipmonitor /usr/local/sbin/voipmonitor
service voipmonitor start



Configuration of a sniffer

Now edit configuration file /etc/voipmonitor.conf and run voipmonitor

/etc/init.d/voipmonitor start


Systemd script for bringing up voipmonitor service at a boot time

If your system uses systemd for services management create a systemd startup script


Compile shared binary

Please see README.* inside the sources (we recommend to use the static version)

git clone -b master https://github.com/voipmonitor/sniffer.git

Or develop branch

git clone -b develop https://github.com/voipmonitor/sniffer.git

Sniffer uninstallation

cleaning script for SysV based systems

Here is simple cleaning script.

#!/bin/bash

SHAREDIR=usr/local/share/voipmonitor
AUDIODIR=$SHAREDIR/audio
BINDIR=usr/local/sbin
CFGDIR=etc
INITDIR=$CFGDIR/init.d
SENSOR=voipmonitor
SPOOLDIR=/var/spool/$SENSOR

echo "Stopping $SENSOR"
/$INITDIR/$SENSOR stop

echo "Uninstalling /$SHAREDIR"
rm -rf /$SHAREDIR

echo "Uninstalling $SENSOR binary from /$BINDIR/$SENSOR"
rm /$BINDIR/$SENSOR

echo "Moving /$CFGDIR/$SENSOR.conf to /$CFGDIR/$SENSOR.conf-backup."
mv /$CFGDIR/$SENSOR.conf /$CFGDIR/$SENSOR.conf-backup

echo "Deleting $SPOOLDIR"
rm -rf $SPOOLDIR

update-rc.d $SENSOR remove &>/dev/null
chkconfig $SENSOR off &>/dev/null
chkconfig --del $SENSOR &>/dev/null

echo "Deleting starting script /$INITDIR/$SENSOR"
rm /$INITDIR/$SENSOR

echo;
echo "The database is not deleted. Do it manually.";
echo;

cleaning commands for systemd based systems

For systemd based OSes use following commands (when chkconfig missing and paths in /etc/voipmonitor.conf kept default)

systemctl disable voipmonitor
rm /usr/local/sbin/voipmonitor
rm /etc/init.d/voipmonitor
rm /etc/voipmonitor.conf
rm -rf /var/spool/voipmonitor

remove also CDRs?

Consider to drop database, where are CDRs kept in case db used locally and you need to remove it, if db not used there anymore you can also uninstall db(mysql/mariadb) using system commands and remove its datadir /var/lib/mysql

mysqladmin drop database voipmonitor
mysql -e 'drop database voipmonitor'
#systemctl disable mariadb
#rm -rf /varlib/mysql

FreeBSD 11

FreeBSD_11