Installing QueueMetrics on Ubuntu (24.04) and Debian (12) 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 v26.01.1.4 and Tomcat v9.0.113 on a Ubuntu 24.04 or Debian 12 machine.

Debian only

To install it on Debian 12, download the appropriate repository configuration file: mkdir -p /etc/apt/sources.list.d wget http://www.mirbsd.org/~tg/Debs/sources.txt/wtf-bookworm.sources -O /etc/apt/sources.list.d/wtf-bookworm.sources apt-get update Explanation: Java 8 is not available by default on Debian 12 but Thorsten Glaser, the current maintainer of OpenJDK 8 in Debian, provides a repository which includes OpenJDK 8, built using the Debian OpenJDK 8 package. See also: https://unix.stackexchange.com/questions/749903/how-can-i-install-java-8-on-debian-12-bookworm

Step 1: Install the necessary dependencies.

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

Step 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)

Step 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 --...

Step 4: Download Tomcat.

wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.113/bin/apache-tomcat-9.0.113.tar.gz

Step 5: Create the folder.

mkdir -p /opt/tomcat-queuemetrics

Step 6: Unpack Tomcat.

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

Step 7: Download QueueMetrics.

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

Step 8: Unpack QueueMetrics.

tar xzf QueueMetrics-26.01.1.4.tar.gz -C /opt/tomcat-queuemetrics/apache-tomcat-9.0.113/webapps/

Step 9: Create a symbolic link.

ln -s /opt/tomcat-queuemetrics/apache-tomcat-9.0.113/webapps/queuemetrics-26.01.1.4 /opt/tomcat-queuemetrics/apache-tomcat-9.0.113/webapps/queuemetrics

Step 10: Update MySQL root password.

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

Step 11: Start Tomcat.

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