Ubuntu 24.04 LTS: Difference between revisions
Line 45: | Line 45: | ||
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 | 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== | ==Enable php82== |
Revision as of 15:21, 8 July 2024
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.
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:
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
Install
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
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=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.
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.