Installing QueueMetrics on Ubuntu (22.02) server

2020-03-09

IMPORTANT: you should install QueueMetrics manually only if you are an expert user. Unfortunately this is a non-standard installation in a non-standard environment and Loway won't be able to support you with system administration problems (tomcat configuration, database permissions and so on), although the support on the QueueMetrics software itself will remain available as always.

Being CentOS the natural habitat for Asterisk and almost all the Asterisk-related world, we always suggest to install QueueMetrics on a CentOS machine (or whatever CentOS flavor like FreePBX or Elastix), and if you ask us CentOS is always the better solution, even in a virtual machine. Using CentOS is not always possible though so your are free to install QueueMetrics in whatever system you prefer.

QueueMetrics is a Java servlet application that runs over a Tomcat server. Potentially you can run QueueMetrics on every Linux distribution and Operating System, Windows as well.

Although the procedure may change amongst the various different systems, conceptually it's ever the same: install all the dependencies and put QueueMetrics on the Tomcat server.

Given that we can't cover every possible Operating System in this tutorial, we'll use a Ubuntu machine to show you the steps to get QueueMetrics working. Your part will be to adapt the steps to your system and situation and remember that filenames and directories may be different.

For this procedure we are going to be using QueueMetrics v22.02.9.186 and Tomcat v8.5.81 on a Ubuntu 22.02 machine.

1) Install the necessary dependencies:

apt-get install openjdk-8-jdk-headless mariadb-server

2) Verify the Java version:

java -version

Example of positive result:

openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)

3) Verify MariaDB is working and running

systemctl status mariadb

Example of positive result:

● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-03-04 08:53:18 CET; 2 days ago
 Main PID: 978 (mysqld_safe)
   CGroup: /system.slice/mariadb.service
          ├─ 978 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
          └─1250 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --...

4) Download Tomcat:

wget http://archive.apache.org/dist/tomcat/tomcat-8/v8.5.81/bin/apache-tomcat-8.5.81.tar.gz

5) Create the folder:

mkdir -p /opt/tomcat-queuemetrics

6) Unpack Tomcat:

tar xzf apache-tomcat-8.5.81.tar.gz -C /opt/tomcat-queuemetrics

7) Download QueueMetrics:

wget https://downloads.loway.ch/software/queuemetrics/QueueMetrics-22.02.9.186.tar.gz

8) Unpack QueueMetrics:

tar xzf QueueMetrics-22.02.9.186.tar.gz -C /opt/tomcat-queuemetrics/apache-tomcat-8.5.81/webapps/

9) Create a symbolic link:

ln -s /opt/tomcat-queuemetrics/apache-tomcat-8.5.81/webapps/queuemetrics-22.02.9.186 /opt/tomcat-queuemetrics/apache-tomcat-8.5.81/webapps/queuemetrics

10) Update MySQL root password:

mysql -e "set password for 'root'@'localhost' = password('')"

11) Start Tomcat:

/opt/tomcat-queuemetrics/apache-tomcat-8.5.81/bin/startup.sh