Debian 10: Difference between revisions

From VoIPmonitor.org
Jump to navigation Jump to search
(Created page with "= Install MariaDB= apt-get -y install mariadb-server = Install voipmonitor sensor and GUI= ==Installation of packages needed by voipmonitor's GUI== apt-get -y install php ph...")
 
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Install MariaDB=
= Install MariaDB=
apt-get -y install mariadb-server
apt-get -y install mariadb-server


= Install voipmonitor sensor and GUI=
== change auth method for root@localhost user from unix_socket to mysql_native_password type with no password==
==Installation of packages needed by voipmonitor's GUI==
Start the mysql console first with '''mysql''' and push following queries:
  apt-get -y install php php-gd php-mysql php-cli libapache2-mod-php php-mbstring php-zip tshark mtr librsvg2-bin gsfonts rrdtool
  MariaDB> ALTER USER root@localhost IDENTIFIED VIA mysql_native_password;
(When asked if non-superuser can capture traffic You can answer No)
MariaDB> SET PASSWORD = PASSWORD("");
 
  MariaDB> FLUSH PRIVILEGES;
 
==create database needed for voipmonitor==
  mysqladmin create voipmonitor


= Install voipmonitor sensor=
==Installing sensor - voipmonitor service==
==Installing sensor - voipmonitor service==
  mkdir /usr/src/voipmonitor
  mkdir /usr/src/voipmonitor
Line 18: Line 16:
  cd voipmonitor-*
  cd voipmonitor-*
  ./install-script.sh
  ./install-script.sh
Beware for 32bit use following link for download instead in wget comman: https://www.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz
= Install voipmonitor GUI=
==Installation of packages needed by voipmonitor's GUI==
apt-get -y install php php-gd php-mysql php-cli libapache2-mod-php php7.3-mbstring php-zip tshark mtr librsvg2-bin gsfonts rrdtool libtiff-tools
(When asked if non-superuser can capture traffic You can answer No)
==create database needed for voipmonitor==
mysqladmin create voipmonitor


==Installing IOncube - php loader / decryptor==
==Installing IOncube - php loader / decryptor==
Line 43: Line 51:
  /etc/init.d/apache2 restart
  /etc/init.d/apache2 restart


=Edit settings of a service and set it to start when boot=
Edit sensor settings and start sensor - edit /etc/voipmonitor.conf and set appropriate mysql password,save* options and interface option (interface names gets changed in deb9/deb10)
Edit sensor settings and start sensor - edit /etc/voipmonitor.conf and set appropriate mysql password,save* options and interface option (interface names gets changed in deb9/deb10)
  /etc/init.d/voipmonitor start
  /etc/init.d/voipmonitor start
Line 49: Line 58:
Enable service start via sysV with:
Enable service start via sysV with:
  systemctl enable voipmonitor
  systemctl enable voipmonitor
=Binaries downloaded with first access of the GUI (voluntary)=
You can speedup the installation process by downloading and installing binaries the GUI needs with following steps for 64bits only.
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/phantomjs-2.1.1-x86_64.gz/download -O '/var/www/html/bin/phantomjs-2.1.1-x86_64.gz'
gunzip '/var/www/html/bin/phantomjs-2.1.1-x86_64.gz'
chmod +x '/var/www/html/bin/phantomjs-2.1.1-x86_64'
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/sox-x86_64.gz/download -O '/var/www/html/bin/sox-x86_64.gz'
gunzip '/var/www/html/bin/sox-x86_64.gz'
chmod +x '/var/www/html/bin/sox-x86_64'
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/tshark-2.3.0.3-x86_64.gz/download -O '/var/www/html/bin/tshark-2.3.0.3-x86_64.gz'
gunzip '/var/www/html/bin/tshark-2.3.0.3-x86_64.gz'
chmod +x '/var/www/html/bin/tshark-2.3.0.3-x86_64'
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/mergecap-2.3.0.3-x86_64.gz/download -O '/var/www/html/bin/mergecap-2.3.0.3-x86_64.gz'
gunzip '/var/www/html/bin/mergecap-2.3.0.3-x86_64.gz'
chmod +x '/var/www/html/bin/mergecap-2.3.0.3-x86_64'
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/t38_decode-2-i686.gz/download -O '/var/www/html/bin/t38_decode-2-i686.gz'
gunzip '/var/www/html/bin/t38_decode-2-i686.gz'
chmod +x '/var/www/html/bin/t38_decode-2-i686'
=Building service binary from sources (voluntary)=
Following describes how to build and install custom voipmonitor binary from sources (tested with sources from 25.2.1)
==First install necesary develop packages==
apt-get -y install git build-essential unixodbc-dev libvorbis-dev libpcap-dev libsnappy-dev libcurl4-openssl-dev libicu-dev libjson-c-dev libssh-dev librrd-dev libglib2.0-dev libxml2-dev libfftw3-dev liblzma-dev liblzo2-dev libpng-dev libgcrypt-dev libgoogle-perftools-dev libmariadb-dev libmariadb-dev-compat
==Then download voipmonitor sources and build==
mkdir /usr/src/voipmonitor-git
cd /usr/src/voipmonitor-git
git clone https://github.com/voipmonitor/sniffer.git ./
cd sniffer
./configure
make
make install

Latest revision as of 11:36, 16 July 2020

Install MariaDB

apt-get -y install mariadb-server

change auth method for root@localhost user from unix_socket to mysql_native_password type with no password

Start the mysql console first with mysql and push following queries:

MariaDB> ALTER USER root@localhost IDENTIFIED VIA mysql_native_password;
MariaDB> SET PASSWORD = PASSWORD("");
MariaDB> FLUSH PRIVILEGES;

Install voipmonitor sensor

Installing sensor - voipmonitor service

mkdir /usr/src/voipmonitor
cd /usr/src/voipmonitor
wget --content-disposition http://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz -O x.tar.gz
tar xzf x.tar.gz 
cd voipmonitor-*
./install-script.sh

Beware for 32bit use following link for download instead in wget comman: https://www.voipmonitor.org/current-stable-sniffer-static-32bit.tar.gz

Install voipmonitor GUI

Installation of packages needed by voipmonitor's GUI

apt-get -y install php php-gd php-mysql php-cli libapache2-mod-php php7.3-mbstring php-zip tshark mtr librsvg2-bin gsfonts rrdtool libtiff-tools

(When asked if non-superuser can capture traffic You can answer No)

create database needed for voipmonitor

mysqladmin create voipmonitor

Installing IOncube - php loader / decryptor

wget http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_7.3.so -O /usr/lib/php/20180731/ioncube_loader_lin_7.3.so
echo "zend_extension = /usr/lib/php/20180731/ioncube_loader_lin_7.3.so" > /etc/php/7.3/mods-available/ioncube.ini
ln -s /etc/php/7.3/mods-available/ioncube.ini /etc/php/7.3/apache2/conf.d/01-ioncube.ini
ln -s /etc/php/7.3/mods-available/ioncube.ini /etc/php/7.3/cli/conf.d/01-ioncube.ini

Installing voipmonitor GUI

cd /var/www/html
rm -f index.html 
wget "http://www.voipmonitor.org/download-gui?version=latest&major=5&phpver=73&festry" -O w.tar.gz
tar xzf w.tar.gz
mv voipmonitor-gui*/* ./

Finalizing steps

For working alerts / reports, system needs to run periodicaly script using scheduller

echo " * * * * * root php /var/www/html/php/run.php cron" >> /etc/crontab
kill -HUP `pgrep cron`

Create spooldir for sensor

mkdir /var/spool/voipmonitor/

Set privileges for apache

chown www-data /var/spool/voipmonitor/
chown -R www-data /var/www/html
/etc/init.d/apache2 restart

Edit settings of a service and set it to start when boot

Edit sensor settings and start sensor - edit /etc/voipmonitor.conf and set appropriate mysql password,save* options and interface option (interface names gets changed in deb9/deb10)

/etc/init.d/voipmonitor start


Enable service start via sysV with:

systemctl enable voipmonitor

Binaries downloaded with first access of the GUI (voluntary)

You can speedup the installation process by downloading and installing binaries the GUI needs with following steps for 64bits only.

wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/phantomjs-2.1.1-x86_64.gz/download -O '/var/www/html/bin/phantomjs-2.1.1-x86_64.gz'
gunzip '/var/www/html/bin/phantomjs-2.1.1-x86_64.gz'
chmod +x '/var/www/html/bin/phantomjs-2.1.1-x86_64'
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/sox-x86_64.gz/download -O '/var/www/html/bin/sox-x86_64.gz'
gunzip '/var/www/html/bin/sox-x86_64.gz'
chmod +x '/var/www/html/bin/sox-x86_64'
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/tshark-2.3.0.3-x86_64.gz/download -O '/var/www/html/bin/tshark-2.3.0.3-x86_64.gz'
gunzip '/var/www/html/bin/tshark-2.3.0.3-x86_64.gz'
chmod +x '/var/www/html/bin/tshark-2.3.0.3-x86_64'
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/mergecap-2.3.0.3-x86_64.gz/download -O '/var/www/html/bin/mergecap-2.3.0.3-x86_64.gz'
gunzip '/var/www/html/bin/mergecap-2.3.0.3-x86_64.gz'
chmod +x '/var/www/html/bin/mergecap-2.3.0.3-x86_64'
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/t38_decode-2-i686.gz/download -O '/var/www/html/bin/t38_decode-2-i686.gz'
gunzip '/var/www/html/bin/t38_decode-2-i686.gz'
chmod +x '/var/www/html/bin/t38_decode-2-i686'

Building service binary from sources (voluntary)

Following describes how to build and install custom voipmonitor binary from sources (tested with sources from 25.2.1)

First install necesary develop packages

apt-get -y install git build-essential unixodbc-dev libvorbis-dev libpcap-dev libsnappy-dev libcurl4-openssl-dev libicu-dev libjson-c-dev libssh-dev librrd-dev libglib2.0-dev libxml2-dev libfftw3-dev liblzma-dev liblzo2-dev libpng-dev libgcrypt-dev libgoogle-perftools-dev libmariadb-dev libmariadb-dev-compat

Then download voipmonitor sources and build

mkdir /usr/src/voipmonitor-git
cd /usr/src/voipmonitor-git
git clone https://github.com/voipmonitor/sniffer.git ./
cd sniffer
./configure
make
make install