Ubuntu 22.04 LTS: Difference between revisions

From VoIPmonitor.org
(Created page with "= Step by step = installation instructions explained == Mysql and packages == apt-get -y install tshark mtr librsvg2-bin gsfonts mysql-server ethtool === Change mysql sett...")
 
(Add MySQL authentication methods note - PHP 8.1+ supports caching_sha2_password natively, no mysql_native_password needed. Links to FAQ for details.)
 
(6 intermediate revisions by 2 users not shown)
Line 3: Line 3:


== Mysql and packages ==
== Mysql and packages ==
apt-get update


  apt-get -y install tshark mtr librsvg2-bin gsfonts mysql-server ethtool
  apt-get -y install tshark mtr librsvg2-bin gsfonts mysql-server ethtool
Line 11: Line 12:
  service mysql restart
  service mysql restart


Change root@localhost's login plugin from auth_socket to password(less) and create db for voipmonitor,
'''Note on MySQL Authentication Methods:'''
 
Ubuntu 22.04 uses MySQL 8.0 which defaults to <code>caching_sha2_password</code>. Since this guide installs PHP 8.1 (which is newer than PHP 7.4.4), the '''mysql_native_password line is NOT required'''. PHP 8.1 with the mysqlnd driver automatically supports caching_sha2_password.
 
If you see MySQL deprecation warnings about mysql_native_password, you can safely use the standard MySQL 8 authentication without any additional configuration. For more details, see the [[FAQ#MySQL_Authentication|FAQ - MySQL Authentication]] section.
 
Change root@localhost's login plugin from auth_socket and create database for voipmonitor.
 
For standard authentication (recommended):
{{Tip|1=PHP 8.1+ supports MySQL 8's <code>caching_sha2_password</code> natively. No special configuration needed.}}


  mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY "MySEcretPass";
mysql> CREATE DATABASE voipmonitor;
mysql> CREATE USER 'voipmonitor'@'localhost' IDENTIFIED BY 'YourPassword';
mysql> GRANT ALL PRIVILEGES ON voipmonitor.* TO 'voipmonitor'@'localhost';
mysql> FLUSH PRIVILEGES;
 
For root passwordless access (as shown in the copy & paste script below):
  mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY "";
  mysql> CREATE DATABASE voipmonitor;
  mysql> CREATE DATABASE voipmonitor;


Line 19: Line 35:


== PHP + modules and ioncube ==
== PHP + modules and ioncube ==
  apt-get -y install php php-gd php-mysql php-cli php-mbstring php-xml php-zip unzip apache2 libapache2-mod-php  
  apt-get -y install php php-gd php-mysql php-cli php-curl php-mbstring php-xml php-zip unzip apache2 libapache2-mod-php  
  wget http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_8.1.so -O /usr/lib/php/8.1/ioncube_loader_lin_8.1.so
  wget http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_8.1.so -O /usr/lib/php/8.1/ioncube_loader_lin_8.1.so
  echo "zend_extension = /usr/lib/php/8.1/ioncube_loader_lin_8.1.so" > /etc/php/8.1/apache2/conf.d/01-ioncube.ini
  echo "zend_extension = /usr/lib/php/8.1/ioncube_loader_lin_8.1.so" > /etc/php/8.1/apache2/conf.d/01-ioncube.ini
Line 38: Line 54:
== Install voipmonitor's GUI ==
== Install voipmonitor's GUI ==
  cd /var/www/html
  cd /var/www/html
  wget "http://www.voipmonitor.org/download-gui?version=latest&major=5&phpver=81&festry" -O w.tar.gz
  wget "http://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=81&festry" -O w.tar.gz
  tar xzf w.tar.gz
  tar xzf w.tar.gz
  mv voipmonitor-gui*/* ./
  mv voipmonitor-gui*/* ./
Line 74: Line 90:
   
   
  #T38 decoder
  #T38 decoder
  wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/t38_decode-2-i686.gz/download -O '/var/www/html/bin/t38_decode-2-i686.gz'
  wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/t38_decode-3-i686.gz/download -O '/var/www/html/bin/t38_decode-3-i686.gz'
  gunzip '/var/www/html/bin/t38_decode-2-i686.gz'
  gunzip '/var/www/html/bin/t38_decode-3-i686.gz'
  chmod +x '/var/www/html/bin/t38_decode-2-i686'
  chmod +x '/var/www/html/bin/t38_decode-3-i686'


= Installation copy & paste script =
= Installation copy & paste script =
This copy and paste script works on fresh install of a linux (when none voipmonitor installed there), otherwise take care of stars '*' in cd,tar,mv commands
This copy and paste script works on fresh install of a linux (when none voipmonitor installed there), otherwise take care of stars '*' in cd,tar,mv commands
  apt-get -y install tshark mtr librsvg2-bin gsfonts mysql-server ethtool php php-gd php-mysql php-cli php-mbstring php-xml php-zip unzip apache2 libapache2-mod-php wget -f
 
{{Tip|1=Ubuntu 22.04 with PHP 8.1+ supports MySQL 8's <code>caching_sha2_password</code> authentication. The <code>mysql_native_password</code> setting in this script is for root convenience only - your voipmonitor database user can use the default MySQL 8 authentication. See the [[FAQ#MySQL_Authentication|FAQ - MySQL Authentication]] for details.}}
 
  apt-get -y install tshark mtr librsvg2-bin gsfonts mysql-server ethtool php php-gd php-mysql php-cli php-curl php-mbstring php-xml php-zip unzip apache2 libapache2-mod-php wget -f


  mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY \"\""
  mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY \"\""
  mysql -e "CREATE DATABASE voipmonitor"
  mysql -e "CREATE DATABASE voipmonitor"
  wget http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_7.4.so -O /usr/lib/php/20190902/ioncube_loader_lin_7.4.so
  wget http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_8.1.so -O /usr/lib/php/8.1/ioncube_loader_lin_8.1.so
  echo "zend_extension = /usr/lib/php/20190902/ioncube_loader_lin_7.4.so" > /etc/php/7.4/apache2/conf.d/01-ioncube.ini
  echo "zend_extension = /usr/lib/php/8.1/ioncube_loader_lin_8.1.so" > /etc/php/8.1/apache2/conf.d/01-ioncube.ini
  echo "zend_extension = /usr/lib/php/20190902/ioncube_loader_lin_7.4.so" > /etc/php/7.4/cli/conf.d/01-ioncube.ini
  echo "zend_extension = /usr/lib/php/8.1/ioncube_loader_lin_8.1.so" > /etc/php/8.1/cli/conf.d/01-ioncube.ini
  cd /var/www/html
  cd /var/www/html
  wget "http://www.voipmonitor.org/download-gui?version=latest&major=5&phpver=72&festry" -O w.tar.gz
  wget "http://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=81&festry" -O w.tar.gz
  tar xzf w.tar.gz
  tar xzf w.tar.gz
  mv voipmonitor-gui*/* ./
  mv voipmonitor-gui*/* ./

Latest revision as of 21:05, 7 January 2026

Step by step

installation instructions explained

Mysql and packages

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

Change mysql settings

In /etc/mysql/mysql.conf.d/mysqld.cnf in [mysqld] section set options with respect to our doc Scaling#MySQL_performance and restart the service:

service mysql restart

Note on MySQL Authentication Methods:

Ubuntu 22.04 uses MySQL 8.0 which defaults to caching_sha2_password. Since this guide installs PHP 8.1 (which is newer than PHP 7.4.4), the mysql_native_password line is NOT required. PHP 8.1 with the mysqlnd driver automatically supports caching_sha2_password.

If you see MySQL deprecation warnings about mysql_native_password, you can safely use the standard MySQL 8 authentication without any additional configuration. For more details, see the FAQ - MySQL Authentication section.

Change root@localhost's login plugin from auth_socket and create database for voipmonitor.

For standard authentication (recommended):

💡 Tip: PHP 8.1+ supports MySQL 8's caching_sha2_password natively. No special configuration needed.

mysql> CREATE DATABASE voipmonitor;
mysql> CREATE USER 'voipmonitor'@'localhost' IDENTIFIED BY 'YourPassword';
mysql> GRANT ALL PRIVILEGES ON voipmonitor.* TO 'voipmonitor'@'localhost';
mysql> FLUSH PRIVILEGES;

For root passwordless access (as shown in the copy & paste script below):

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY "";
mysql> CREATE DATABASE voipmonitor;

Beware That when you keep the password empty - with next mysql_update will be root@localhost user's password changed to auth_socket, and voipmonitor will not be able to use db anymore until you change root@localhost back. THis is true only on ubuntu systems, and only for root@localhost users without password set. Also the ALTER USER statement was introduced in MariaDB 10.2.0

PHP + modules and ioncube

apt-get -y install php php-gd php-mysql php-cli php-curl php-mbstring php-xml php-zip unzip apache2 libapache2-mod-php 
wget http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_8.1.so -O /usr/lib/php/8.1/ioncube_loader_lin_8.1.so
echo "zend_extension = /usr/lib/php/8.1/ioncube_loader_lin_8.1.so" > /etc/php/8.1/apache2/conf.d/01-ioncube.ini
echo "zend_extension = /usr/lib/php/8.1/ioncube_loader_lin_8.1.so" > /etc/php/8.1/cli/conf.d/01-ioncube.ini

Install latest 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

Edit /etc/voipmonitor.conf (set mysqlpass,interface,sipport,cleandatabase,maxpoolsize options at least)

/etc/init.d/voipmonitor start
systemctl enable voipmonitor

Install voipmonitor's GUI

cd /var/www/html
wget "http://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=81&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

Optional / Voluntary downloads

Binaries for the GUI

Following binaries are autodownloaded in time of first GUI login, but can be pre-installed from konsole as well

#HTML/SVG paints:
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/phantomjs-2.1.1-x86_64.gz/download -O '/var/www/html/bin/phantomjs-2.1.1-x86_64.gz'
gunzip '/var/www/html/bin/phantomjs-2.1.1-x86_64.gz'
chmod +x '/var/www/html/bin/phantomjs-2.1.1-x86_64'

#SOX binary
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/sox-x86_64.gz/download -O '/var/www/html/bin/sox-x86_64.gz'
gunzip '/var/www/html/bin/sox-x86_64.gz'
chmod +x '/var/www/html/bin/sox-x86_64'

#tshark binary
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/tshark-2.3.0.3-x86_64.gz/download -O '/var/www/html/bin/tshark-2.3.0.3-x86_64.gz'
gunzip '/var/www/html/bin/tshark-2.3.0.3-x86_64.gz'
chmod +x '/var/www/html/bin/tshark-2.3.0.3-x86_64'

#mergecap
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/mergecap-2.3.0.3-x86_64.gz/download -O '/var/www/html/bin/mergecap-2.3.0.3-x86_64.gz'
gunzip '/var/www/html/bin/mergecap-2.3.0.3-x86_64.gz'
chmod +x '/var/www/html/bin/mergecap-2.3.0.3-x86_64'

#T38 decoder
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/t38_decode-3-i686.gz/download -O '/var/www/html/bin/t38_decode-3-i686.gz'
gunzip '/var/www/html/bin/t38_decode-3-i686.gz'
chmod +x '/var/www/html/bin/t38_decode-3-i686'

Installation copy & paste script

This copy and paste script works on fresh install of a linux (when none voipmonitor installed there), otherwise take care of stars '*' in cd,tar,mv commands

💡 Tip: Ubuntu 22.04 with PHP 8.1+ supports MySQL 8's caching_sha2_password authentication. The mysql_native_password setting in this script is for root convenience only - your voipmonitor database user can use the default MySQL 8 authentication. See the FAQ - MySQL Authentication for details.

apt-get -y install tshark mtr librsvg2-bin gsfonts mysql-server ethtool php php-gd php-mysql php-cli php-curl php-mbstring php-xml php-zip unzip apache2 libapache2-mod-php wget -f
mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY \"\""
mysql -e "CREATE DATABASE voipmonitor"
wget http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_8.1.so -O /usr/lib/php/8.1/ioncube_loader_lin_8.1.so
echo "zend_extension = /usr/lib/php/8.1/ioncube_loader_lin_8.1.so" > /etc/php/8.1/apache2/conf.d/01-ioncube.ini
echo "zend_extension = /usr/lib/php/8.1/ioncube_loader_lin_8.1.so" > /etc/php/8.1/cli/conf.d/01-ioncube.ini
cd /var/www/html
wget "http://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=81&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
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
systemctl enable voipmonitor


Before first login to GUI with browser after use of copy&paste for install, you need to edit mysql config and voipmonitor service config, and restart both service.