Debian 13: Difference between revisions

From VoIPmonitor.org
No edit summary
(Restructure: reduce excessive headings, use numbered steps)
 
Line 1: Line 1:
= Install MariaDB=
This guide describes the installation of VoIPmonitor on '''Debian 13 (Trixie)''' with PHP 8.4. The installation consists of three main components: MariaDB database, Web GUI, and the Sensor (sniffer).
 
== Prerequisites ==
* Fresh Debian 13 installation
* Root access
* Internet connectivity
 
== MariaDB Installation ==
 
'''1. Install MariaDB server:'''
  apt-get update
  apt-get update
  apt-get -y install mariadb-server
  apt-get -y install mariadb-server


== change auth method for root@localhost user from unix_socket to mysql_native_password type with no password==
'''2. Configure root authentication:'''
Start the mysql console first with '''mysql''' and push following queries:
 
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> ALTER USER root@localhost IDENTIFIED VIA mysql_native_password;
  MariaDB> SET PASSWORD = PASSWORD("");
  MariaDB> SET PASSWORD = PASSWORD("");
  MariaDB> FLUSH PRIVILEGES;
  MariaDB> FLUSH PRIVILEGES;
MariaDB> exit
'''3. Configure MariaDB for performance:'''


==Set mariadb's config==
Edit <code>/etc/mysql/mariadb.conf.d/50-server.cnf</code> and add these options to the <code>[mysqld]</code> section. See the [[Scaling#MySQL_performance|scaling guide]] for more details.
in /etc/mysql/mariadb.conf.d/50-server.cnf edit [mysqld] section and add options, like suggested in [https://www.voipmonitor.org/doc/Scaling#MySQL_performance scalling] section fo our doc
  innodb_flush_log_at_trx_commit = 2
  innodb_flush_log_at_trx_commit = 2
  innodb_file_format = barracuda
  innodb_file_format = barracuda
#set there up to half of available mem
  innodb_buffer_pool_size = 8GB
  innodb_buffer_pool_size = 8GB
#starting from mariadb 10.6 is necesasry to disable read-only for compressed tables
  innodb_read_only_compressed = OFF
  innodb_read_only_compressed=OFF
 
{{Note|Set <code>innodb_buffer_pool_size</code> to approximately half of your available RAM.}}


==Restart mariadb service==
'''4. Apply changes and create database:'''
  systemctl restart mariadb
  systemctl restart mariadb
mysqladmin create voipmonitor


==create database needed for voipmonitor==
== Web GUI Installation ==
mysqladmin create voipmonitor


= Install voipmonitor GUI=
'''1. Install required packages:'''
==Installation of packages needed by voipmonitor's GUI==
  apt-get install php php-gd php-mysql php-cli php-curl libapache2-mod-php php-mbstring php-zip tshark mtr librsvg2-bin fonts-urw-base35 rrdtool libtiff-tools wget vim
  apt-get install php php-gd php-mysql php-cli php-curl libapache2-mod-php php-mbstring php-zip tshark mtr librsvg2-bin fonts-urw-base35 rrdtool libtiff-tools wget vim
(When asked if non-superuser can capture traffic You can answer No)


==Installing IOncube - php loader / decryptor==
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 --no-continue http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_8.4.so -O /usr/lib/php/8.4/ioncube_loader_lin_8.4.so
  wget --no-continue http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_8.4.so -O /usr/lib/php/8.4/ioncube_loader_lin_8.4.so
  echo "zend_extension = /usr/lib/php/8.4/ioncube_loader_lin_8.4.so" > /etc/php/8.4/mods-available/ioncube.ini
  echo "zend_extension = /usr/lib/php/8.4/ioncube_loader_lin_8.4.so" > /etc/php/8.4/mods-available/ioncube.ini
Line 35: Line 50:
  ln -s /etc/php/8.4/mods-available/ioncube.ini /etc/php/8.4/cli/conf.d/01-ioncube.ini
  ln -s /etc/php/8.4/mods-available/ioncube.ini /etc/php/8.4/cli/conf.d/01-ioncube.ini


==Installing package for 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=84&festry" -O w.tar.gz
  wget "http://www.voipmonitor.org/download-gui?version=latest&major=5&phpver=84" -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`
 
Set privileges for apache
  chown -R www-data /var/www/html
  chown -R www-data /var/www/html
systemctl restart apache2
  mkdir /var/spool/voipmonitor/
  mkdir /var/spool/voipmonitor/
  chown www-data /var/spool/voipmonitor/
  chown www-data /var/spool/voipmonitor/
systemctl restart apache2


=Install voipmonitor sensor=
== Sensor Installation ==
==Installing sensor - voipmonitor service==
 
'''1. Download and install sensor:'''
  mkdir /usr/src/voipmonitor
  mkdir /usr/src/voipmonitor
  cd /usr/src/voipmonitor
  cd /usr/src/voipmonitor
Line 61: Line 74:
  cd voipmonitor-*
  cd voipmonitor-*
  ./install-script.sh --no-user-input
  ./install-script.sh --no-user-input
#set in /etc/voipmonitor.conf at least interface option it can be like interface=ens33, spooldir=/var/spool/voipmonitor, cleandatabase=31, sipport=5060, maxpoolsize=102400
 
# start the sensor after the setting
'''2. Configure sensor:'''
 
Edit <code>/etc/voipmonitor.conf</code> and set at minimum:
interface = eth0
spooldir = /var/spool/voipmonitor
cleandatabase = 31
sipport = 5060
maxpoolsize = 102400
 
{{Note|Replace <code>eth0</code> with your actual network interface name (e.g., <code>ens33</code>).}}
 
'''3. Start and enable sensor:'''
  systemctl start voipmonitor
  systemctl start voipmonitor
systemctl enable voipmonitor


=set service to be started at a boot time=
== Finish Installation ==
systemctl enable voipmonitor


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


Now go to http://yourserver/ and finish the installation.
== See Also ==
* [[Scaling]] - Performance tuning
* [[Configuration_file]] - Full configuration reference
* [[GUI_installation]] - Detailed GUI setup

Latest revision as of 22:14, 11 December 2025

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

Prerequisites

  • Fresh Debian 13 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. Configure MariaDB for performance:

Edit /etc/mysql/mariadb.conf.d/50-server.cnf and add these options to the [mysqld] section. See the scaling guide for more details.

innodb_flush_log_at_trx_commit = 2
innodb_file_format = barracuda
innodb_buffer_pool_size = 8GB
innodb_read_only_compressed = OFF

Template:Note

4. Apply changes and create database:

systemctl restart mariadb
mysqladmin create voipmonitor

Web GUI Installation

1. Install required packages:

apt-get install php php-gd php-mysql php-cli php-curl libapache2-mod-php php-mbstring php-zip tshark mtr librsvg2-bin fonts-urw-base35 rrdtool libtiff-tools wget vim

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 --no-continue http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_8.4.so -O /usr/lib/php/8.4/ioncube_loader_lin_8.4.so
echo "zend_extension = /usr/lib/php/8.4/ioncube_loader_lin_8.4.so" > /etc/php/8.4/mods-available/ioncube.ini
ln -s /etc/php/8.4/mods-available/ioncube.ini /etc/php/8.4/apache2/conf.d/01-ioncube.ini
ln -s /etc/php/8.4/mods-available/ioncube.ini /etc/php/8.4/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=84" -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)
chown -R www-data /var/www/html
mkdir /var/spool/voipmonitor/
chown www-data /var/spool/voipmonitor/
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 --no-user-input

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.

See Also