Ubuntu 24.04 LTS

From VoIPmonitor.org
Jump to navigation Jump to search

The following steps are necessary to follow, to install the VoIPmonitor GUI and sniffer, including MySQL database, on an Ubuntu 24.04 minimal server installation with 16GB of RAM. Beware that all commands need to be run with root privileges

Database

Install

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

Configure

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

Apply

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`@`127.0.0.1` IDENTIFIED BY 'YourPassword';
GRANT ALL ON voipmonitor.* TO 'voipmonitor'@'127.0.0.1'; 
GRANT SUPER ON *.* TO 'voipmonitor'@'127.0.0.1';
FLUSH PRIVILEGES;

PHP + modules and ioncube:

Install php ad modules

apt install php php-gd php-mysql php-cli php-mbstring php-xml php-zip apache2 libapache2-mod-php cron lsof


Ioncube install

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


Voipmonitor sniffer

Install

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

Configure

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=83&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.

Configure

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

http://IP_of_voipmonitor_host

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.