Ubuntu 24.04 LTS

From VoIPmonitor.org
Jump to navigation Jump to search

The following steps were necessary to install the VoIPmonitor GUI and sniffer, including MySQL database, on an Ubuntu 24.04 minimal server installation with 16GB of RAM.



apt-get update
apt-get install tshark mtr librsvg2-bin gsfonts mysql-server ethtool


Add the recommended settings from the Scaling section of our documentation into MySQL’s configuration. Keep in mind to allocate up to half of the available RAM for the MySQL read cache (innodb_buffer_pool_size).

echo 'innodb_flush_log_at_trx_commit = 2' >> /etc/mysql/mysql.conf.d/mysqld.cnf
echo 'innodb_buffer_pool_size = 8GB' >> /etc/mysql/mysql.conf.d/mysqld.cnf
echo 'skip-log-bin' >> /etc/mysql/mysql.conf.d/mysqld.cnf
echo 'skip-name-resolve' >> /etc/mysql/mysql.conf.d/mysqld.cnf
echo 'default_authentication_plugin=mysql_native_password' >> /etc/mysql/mysql.conf.d/mysqld.cnf


Changes made to MySQL are applied after the service is restarted. Please restart the MySQL service before proceeding to the next steps. You can do this with the following command:

systemctl restart mysql

Create User

Create a new user in the database for VoIPmonitor’s use, with ALL privileges. Please change the ‘YourPassword’ string to something strong and make a note of it. You will need to enter this password again when configuring the service in /etc/voipmonitor.conf, and when you log in for the first time to the GUI using a web browser.

CREATE USER `voipmonitor`@`` IDENTIFIED BY 'YourPassword';
GRANT ALL ON voipmonitor.* TO 'voipmonitor'@''; 
GRANT SUPER ON *.* TO 'voipmonitor'@'';

PHP + modules and ioncube:

Unfortunately, as of May 28, 2024, IonCube does not currently support PHP 8.3. Therefore, you need to install PHP 8.2 from Sury’s repositories. This assumes that you are using Apache2 as a web server (not Nginx). If you want to install Nginx, this document does not cover it, but it is also possible. In that case, add ‘ondrej/nginx’ instead of ‘ondrej/apache2’.

Add O.Sury's repos

add-apt-repository ppa:ondrej/php
add-apt-repository ppa:ondrej/apache2
apt update


apt install php8.2 php8.2-gd php8.2-mysql php8.2-cli php8.2-mbstring php8.2-xml php8.2-zip apache2 libapache2-mod-php8.2 cron lsof

Enable php82

update-alternatives --set php /usr/bin/php8.2
a2dismod php8.3
a2enmod php8.2

Ioncube install

wget http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_8.2.so -O /usr/lib/php/8.2/ioncube_loader_lin_8.2.so
echo "zend_extension = /usr/lib/php/8.2/ioncube_loader_lin_8.2.so" > /etc/php/8.2/apache2/conf.d/01-ioncube.ini
echo "zend_extension = /usr/lib/php/8.2/ioncube_loader_lin_8.2.so" > /etc/php/8.2/cli/conf.d/01-ioncube.ini

Voipmonitor sniffer


cd /usr/src
wget http://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz -O vm-sniffer.tar.gz
tar xzf vm-sniffer.tar.gz
cd voipmonitor*
./install-script.sh --no-user-input


Edit /etc/voipmonitor.conf (set mysqlpass=YourPassword ,mysqluser=voipmonitor, interface=ens33 options at least)
/etc/init.d/voipmonitor start
systemctl enable voipmonitor

Voipmonitor GUI

Install package

cd /var/www/html
wget "http://www.voipmonitor.org/download-gui?version=latest&phpver=82&festry" -O w.tar.gz
tar xzf w.tar.gz
mv voipmonitor-gui*/* ./
rm -f index.html
chown www-data /var/spool/voipmonitor/
chown -R www-data /var/www
echo " * * * * * root php /var/www/html/php/run.php cron" >> /etc/crontab
kill -HUP `pgrep cron`
service apache2 restart

First login to a GUI

Logging in to the VoIPmonitor’s host for the first time requires the MySQL credentials that you set at the beginning of this document.


Open your web browser and enter the following into the address bar


Replace IP_of_voipmonitor_host with the actual IP address of your VoIPmonitor host.

On the VoIPmonitor page, change the MySQL user from ‘root’ to ‘voipmonitor’ and set the password. Then click on ‘Re-check’. These basic settings are stored in the GUI’s installation directory, which is /var/www/html/ by default, in the file ./config/configuration.php.