Debian 10: Difference between revisions

From VoIPmonitor.org
(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...")
 
(Restructure: reduce excessive headings, use numbered steps)
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Install MariaDB=
This guide describes the installation of VoIPmonitor on '''Debian 10 (Buster)''' with PHP 7.3. The installation consists of three main components: MariaDB database, Web GUI, and the Sensor (sniffer).
apt-get -y install mariadb-server


= Install voipmonitor sensor and GUI=
{{Warning|Debian 10 reached end-of-life. Consider upgrading to [[Debian_12|Debian 12]] or [[Debian_13|Debian 13]] for new installations.}}
==Installation of packages needed by voipmonitor's GUI==
apt-get -y install php php-gd php-mysql php-cli libapache2-mod-php php-mbstring php-zip tshark mtr librsvg2-bin gsfonts rrdtool
(When asked if non-superuser can capture traffic You can answer No)


== Prerequisites ==
* Fresh Debian 10 installation
* Root access
* Internet connectivity


==create database needed for voipmonitor==
== MariaDB Installation ==
 
'''1. Install MariaDB server:'''
apt-get update
apt-get -y install mariadb-server
 
'''2. Configure root authentication:'''
 
Change the authentication method for root@localhost from unix_socket to mysql_native_password. Start mysql console and run:
mysql
MariaDB> ALTER USER root@localhost IDENTIFIED VIA mysql_native_password;
MariaDB> SET PASSWORD = PASSWORD("");
MariaDB> FLUSH PRIVILEGES;
MariaDB> exit
 
'''3. Apply changes and create database:'''
systemctl restart mariadb
  mysqladmin create voipmonitor
  mysqladmin create voipmonitor


==Installing sensor - voipmonitor service==
== Web GUI Installation ==
mkdir /usr/src/voipmonitor
 
cd /usr/src/voipmonitor
'''1. Install required packages:'''
  wget --content-disposition http://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz -O x.tar.gz
  apt-get -y install php php-gd php-mysql php-cli php-curl libapache2-mod-php php7.3-mbstring php-zip tshark mtr librsvg2-bin gsfonts rrdtool libtiff-tools wget
tar xzf x.tar.gz
 
cd voipmonitor-*
When asked if non-superusers can capture traffic, answer '''No'''.
./install-script.sh
 
'''2. Install IonCube loader:'''


==Installing IOncube - php loader / decryptor==
IonCube is required for the encrypted PHP files in the GUI.
  wget http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_7.3.so -O /usr/lib/php/20180731/ioncube_loader_lin_7.3.so
  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
  echo "zend_extension = /usr/lib/php/20180731/ioncube_loader_lin_7.3.so" > /etc/php/7.3/mods-available/ioncube.ini
Line 25: Line 42:
  ln -s /etc/php/7.3/mods-available/ioncube.ini /etc/php/7.3/cli/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==
'''3. Download and install GUI:'''
  cd /var/www/html
  cd /var/www/html
  rm -f index.html  
  rm -f index.html  
  wget "http://www.voipmonitor.org/download-gui?version=latest&major=5&phpver=73&festry" -O w.tar.gz
  wget "http://www.voipmonitor.org/download-gui?version=latest&major=5&phpver=73" -O w.tar.gz
  tar xzf w.tar.gz
  tar xzf w.tar.gz
  mv voipmonitor-gui*/* ./
  mv voipmonitor-gui*/* ./


==Finalizing steps==
'''4. Configure cron and permissions:'''
For working alerts / reports, system needs to run periodicaly script using scheduller
  echo "* * * * * root php /var/www/html/php/run.php cron" >> /etc/crontab
  echo " * * * * * root php /var/www/html/php/run.php cron" >> /etc/crontab
  kill -HUP $(pgrep cron)
  kill -HUP `pgrep cron`
  mkdir -p /var/spool/voipmonitor/
Create spooldir for sensor
  mkdir /var/spool/voipmonitor/
Set privileges for apache
  chown www-data /var/spool/voipmonitor/
  chown www-data /var/spool/voipmonitor/
  chown -R www-data /var/www/html
  chown -R www-data /var/www/html
  /etc/init.d/apache2 restart
  systemctl restart apache2
 
== Sensor Installation ==
 
'''1. Download and install sensor:'''
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
 
{{Note|For 32-bit systems, use <code>current-stable-sniffer-static-32bit.tar.gz</code> instead.}}
 
'''2. Configure sensor:'''


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 <code>/etc/voipmonitor.conf</code> and set at minimum:
  /etc/init.d/voipmonitor start
interface = eth0
  spooldir = /var/spool/voipmonitor
cleandatabase = 31
sipport = 5060
maxpoolsize = 102400


{{Note|Replace <code>eth0</code> with your actual network interface name. Interface names changed in Debian 9/10 (e.g., <code>ens33</code>).}}


Enable service start via sysV with:
'''3. Start and enable sensor:'''
systemctl start voipmonitor
  systemctl enable voipmonitor
  systemctl enable voipmonitor
== Finish Installation ==
Open your browser and navigate to <code>http://your-server-ip/</code> to complete the web-based setup wizard.
== Optional: Pre-download GUI Binaries ==
You can speed up the installation by pre-downloading binaries the GUI needs:
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'
== Optional: Building from Source ==
To build the sensor from source code:
'''1. Install build dependencies:'''
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
'''2. Clone and build:'''
mkdir /usr/src/voipmonitor-git
cd /usr/src/voipmonitor-git
git clone https://github.com/voipmonitor/sniffer.git ./
./configure
make
make install
== See Also ==
* [[Debian_12]] - Recommended for new installations
* [[Scaling]] - Performance tuning
* [[Configuration_file]] - Full configuration reference

Latest revision as of 22:17, 11 December 2025

This guide describes the installation of VoIPmonitor on Debian 10 (Buster) with PHP 7.3. The installation consists of three main components: MariaDB database, Web GUI, and the Sensor (sniffer).

Template:Warning

Prerequisites

  • Fresh Debian 10 installation
  • Root access
  • Internet connectivity

MariaDB Installation

1. Install MariaDB server:

apt-get update
apt-get -y install mariadb-server

2. Configure root authentication:

Change the authentication method for root@localhost from unix_socket to mysql_native_password. Start mysql console and run:

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

3. Apply changes and create database:

systemctl restart mariadb
mysqladmin create voipmonitor

Web GUI Installation

1. Install required packages:

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

When asked if non-superusers can capture traffic, answer No.

2. Install IonCube loader:

IonCube is required for the encrypted PHP files in the GUI.

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

3. Download and install GUI:

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

4. Configure cron and permissions:

echo "* * * * * root php /var/www/html/php/run.php cron" >> /etc/crontab
kill -HUP $(pgrep cron)
mkdir -p /var/spool/voipmonitor/
chown www-data /var/spool/voipmonitor/
chown -R www-data /var/www/html
systemctl restart apache2

Sensor Installation

1. Download and install sensor:

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

Template:Note

2. Configure sensor:

Edit /etc/voipmonitor.conf and set at minimum:

interface = eth0
spooldir = /var/spool/voipmonitor
cleandatabase = 31
sipport = 5060
maxpoolsize = 102400

Template:Note

3. Start and enable sensor:

systemctl start voipmonitor
systemctl enable voipmonitor

Finish Installation

Open your browser and navigate to http://your-server-ip/ to complete the web-based setup wizard.

Optional: Pre-download GUI Binaries

You can speed up the installation by pre-downloading binaries the GUI needs:

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'

Optional: Building from Source

To build the sensor from source code:

1. Install build dependencies:

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

2. Clone and build:

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

See Also