Ubuntu 24.04 LTS: Difference between revisions

From VoIPmonitor.org
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
Following steps were necessary to follow to install voipmonitor GUI and sniffer including mysql db into ubuntu 24.04 minimal server installation with 16GB of RAM.
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=
=Database=
Line 10: Line 10:
==Configure==
==Configure==


Add the recommended settings from our [[Scaling#MySQL_performance|Scaling]] section of a doc into mysql's config (keep in mind to set up to half of available RAM for use of the mysql read cache - innodb_buffer_pool_size)
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_flush_log_at_trx_commit = 2' >> /etc/mysql/mysql.conf.d/mysqld.cnf
Line 19: Line 19:


==Apply==
==Apply==
The changes done to a mysql are applied after the service restart - please restart the mysql service there before next steps
 
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
  systemctl restart mysql


==Create User==
==Create User==


Create the new user in a db for voipmonitor's use with ALL privileges. (Please change YourPassword string to something strong and write it down - it will be necessary to fill password again when configuring the service in /etc/voipmonitor.conf - and when you will login for the first time to the GUI using web-browser.
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';
  CREATE USER `voipmonitor`@`127.0.0.1` IDENTIFIED BY 'YourPassword';
Line 33: Line 34:
=PHP + modules and ioncube:=
=PHP + modules and ioncube:=


Unfortunately there is no php 8.3 supported by the ioncube currently (28.5.2024), therefor You need to install php 8.2 from sury's repositories - this expects to use apache2 as a web server(no nginx) - If you want install nginx - this doc not covers it but it is possible as well (add ondrej/nginx instead of ondrej/apache2)
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 O.Sury's repos==
  add-apt-repository ppa:ondrej/php
  add-apt-repository ppa:ondrej/php
  add-apt-repository ppa:ondrej/apache2
  add-apt-repository ppa:ondrej/apache2
Line 90: Line 92:
=First login=
=First login=


Loging in for the first time into voipmonitor's host requires the mysql credentials you set at begin of this doc
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==
==configure==


use the browser, enter into address bar:
Open your web browser and enter the following into the address bar  
  http://IP_of_voipmonitor_host
  http://IP_of_voipmonitor_host
Replace IP_of_voipmonitor_host with the actual IP address of your VoIPmonitor host.


then fill/change in the voipmonitor page the user for mysql (from root to voipmonitor) and also set the password - then click on re-check (this basic settings is then stored into GUI's installation dir which is /var/www/html/ by default into file ./config/configuration.php.
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.

Revision as of 16:27, 28 May 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

(php-unzip chybi)

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

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.