Ubuntu 20.04 LTS: Difference between revisions

From VoIPmonitor.org
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 8: Line 8:
=== Change mysql settings ===
=== 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:
In /etc/mysql/mysql.conf.d/mysqld.cnf in [mysqld] section set options with respect to our doc [[Scaling#MySQL_performance|Scaling]] and restart the service:
  service mysql restart
  service mysql restart


Line 29: Line 29:
  tar xzf vm-sniffer.tar.gz
  tar xzf vm-sniffer.tar.gz
  cd voipmonitor*
  cd voipmonitor*
  ./install-script.sh
  ./install-script.sh --no-user-input


Edit /etc/voipmonitor.conf (set '''mysqlpass''',interface,sipport,cleandatabase,maxpoolsize options at least)
Edit /etc/voipmonitor.conf (set '''mysqlpass''',interface,sipport,cleandatabase,maxpoolsize options at least)
Line 38: Line 38:
== 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=72&festry" -O w.tar.gz
  wget "http://www.voipmonitor.org/download-gui?version=latest&major=5&phpver=74&festry" -O w.tar.gz
  tar xzf w.tar.gz
  tar xzf w.tar.gz
  mv voipmonitor-gui*/* ./
  mv voipmonitor-gui*/* ./
Line 74: Line 74:
   
   
  #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 =

Latest revision as of 10:33, 11 December 2023

Step by step

installation instructions explained

Mysql and packages

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 and restart the service:

service mysql restart

Change root@localhost's login plugin from auth_socket to password(less) and create db for voipmonitor,

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY "MySEcretPass";
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-mbstring php-xml php-zip unzip apache2 libapache2-mod-php 
wget http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_7.4.so -O /usr/lib/php/20190902/ioncube_loader_lin_7.4.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/20190902/ioncube_loader_lin_7.4.so" > /etc/php/7.4/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 --no-user-input

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&phpver=74&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

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
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_7.4.so -O /usr/lib/php/20190902/ioncube_loader_lin_7.4.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/20190902/ioncube_loader_lin_7.4.so" > /etc/php/7.4/cli/conf.d/01-ioncube.ini
cd /var/www/html
wget "http://www.voipmonitor.org/download-gui?version=latest&major=5&phpver=72&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.