Running QueueMetrics on a Windows server

Loway

Revision History
Revision $Revision: 1.5 $$Date: 2011/11/22 08:58:58 $L

Table of Contents

1. Installation guide
1.1. Install the Java JDK
1.2. Install Apache Tomcat
1.3. Installing MySQL server
1.4. Download and install QueueMetrics
2. Frequently Asked Questions (FAQs)

Revision history:

All trademarks are the property of their respective owners.

1. Installation guide

You need to install the following pieces of software:

  • A Java JDK (QueueMetrics runs on Java)
  • Tomcat (that is the piece of software serving QueueMetrics pages)
  • The MySQL server (that is the database)
  • The MySQL connector Connector/J (used by QM to talk to the database).

Quick download links:

1.1. Install the Java JDK

From ’java.sun.com’ go to ’Downloads’.

./Pictures/DL-SDK.png

Download the ’Java JDK’.

CAUTION:

Please make sure it’s the JDK and NOT the JRE! Note that the JDK includes a copy of the JRE as well but it’s larger, about 70 megabytes.

Download the version for Windows. If a "login now" window appears, just close it (it’s optional).

Save the file on the desktop and run it. It will be called something like:

jdk-6u17-windows-i586.exe (about 70 megs)

Install the JDK, with default options.

./Pictures/InstallJava.png

1.2. Install Apache Tomcat

From the Apache Tomcat website - http://tomcat.apache.org/download-60.cgi - download the Windows Service Installer.

./Pictures/DL-Tomcat.png

The file should be called something like:

apache-tomcat-6.0.20.exe (about 6 megs)

Run the installer.

./Pictures/InstallTomcat.png

It should automatically find the JRE/SDK that you just installed.

When prompted:

  • Choose port 8080
  • Create an admin user with name ’admin’ password ’admin’

At the end of the installation, choose "run now".

To test if it is working, enter the following URLin a local browser:

http://127.0.0.1:8080/

If you see the following page, it is working fine.

./Pictures/InstalledTomcat.png

1.2.1. Configuring, starting and stopping Tomcat

As Tomcat is installed as a system service, it can be managed - started, stopped, etc. - from the Services page in Windows, or from its control process.

When it’s running, it is shown in the running processes under the icon:

./Pictures/TomcatIcon.png

From here, you can configure Tomcat. First thing, set the startup type as "automatic".

./Pictures/TomcatControlPanel.png

You should also set the maximum memory usable by Tomcat and QueueMetrics, under the "java" tab as "maximum memory pool". Start by giving it 256 megs of heap and restart Tomcat.

1.3. Installing MySQL server

Go to http://dev.mysql.com/downloads/ and download the current ’Community Edition, GA version’

./Pictures/DL-MySQL.png

The file will be called something like:

mysql-5.1.41-win32.msi

http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.41-win32.msi/from/http://na.mirror.garr.it/mirrors/MySQL/

Also on the same page, download the Connector/J package; go for the ’Generally Available (GA) release’, under the ZIP format.

The file will be called something like:

mysql-connector-java-5.1.10.zip

http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.10.zip/from/http://gd.tuwien.ac.at/db/mysql/

Install the MySQL server, "typical" setup.

./Pictures/MySQL-config.png

Click on "Configure MYSQL now" - If it does not run the configuration wizard, run it manually.

Choose "Standard configuration"

Click on " Install as Windows service" - and "Launch automatically".

Click on "Include BIN directory"…

./Pictures/MySQL-wizard-1.png

Enter "password" as the root password (twice). Click on "enable remote access"

./Pictures/MySQL-wizard-2.png

To test if it is working: after the wizard has run, select ’Start’ / ’Programs’ / ’MySQL’ / ’MySQL server’ / ’MySQL command line client’.

When promted for a password, enter "password".

If it enters the shell, this means MySQL is working. Type "\q" to exit.

1.4. Download and install QueueMetrics

Go to http://queuemetrics.com / Downloads and choose the latest QueueMetrics.

The file will look something like:

QueueMetrics-1.5.5-trial.tar.gz

TIP:

If you do not have a local archiver that can open the .tar.gz Unix file format, download the excellent WinRAR archiver from: http://www.rarlab.com/download.htm

Unpack the archives "QueueMetrics" and "MySQL Connector/J".

Under the Connector/J archive, you’ll find a file called ’mysql-connector-java-5.1.10-bin.jar’. Copy it to the QueueMetrics folder, under ’WEB-INF/lib/’.

On your computer, find a folder under:

c:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps

Copy the "queuemetrics-1.5.5" folder under "webapps" and rename it to "queuemetrics".

./Pictures/QM-tomcat.png

Copy the file ’WEB-INF/README/queuemetrics-sample.sql’ to the local directory. Open a Command prompt.

C:\>mysql -u root -p mysql
Enter password: ********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.41-community MySQL Community Server (GPL)

Type ’help;’ or ’\h’ for help. Type ’\c’ to clear the current input statement.

Run the following command to create a database:

mysql> create database queuemetrics;
Query OK, 1 row affected (0.00 sec)

Run the following command to create a user that can access that database:

mysql> grant all privileges on queuemetrics.* to ’queuemetrics’@’%’ identified by "javadude";
Query OK, 0 rows affected (0.00 sec)

Exit the MySQL shell with "\q".

Now load the database by running the following command:

C:\>mysql -u queuemetrics -p queuemetrics < queuemetrics_sample.sql
Enter password: ********

(Enter ’javadude’ as the password).

Restart Tomcat (open the control panel, click on "Stop" and then "Start").

Go to http://127.0.0.1:8080/queuemetrics - it may take a few seconds to complete because pages have to be compiled.

./Pictures/QM-login.png

Log in as ’demoadmin’ password ’demo’.

Now go to the License page (see the bottom of the main page) to see the status of your installation:

./Pictures/QM-license.png

Notice the following items:

  • ’System path’ - this is where QM’s keys and configuration files are held. After you change them, it is better to log off and restart Tomcat.
  • ’Storage type’: for a machine that’s not running Asterisk, it must be set to ’MySQL’.
  • ’License key’. To run a complete test of Qm, you can download a license key from here: http://queuemetrics.com/sendDemoLicence.jsp

1.4.1. Editing the configuration file

The main configuration file for QueueMetrics is located under the Sytem Path and is called ’configuration.properties’

It can be edited using a text editor like Notepad.

The following properties will very likely have to be changed:

# This is the default queue log file.
default.queue_log_file=sql:PF

# Rewrites Local/XXX@ext channels in the format Agent/XXX
default.rewriteLocalChannels=true

After each set of changes, log off from QM and restart Tomcat.

A complete set of properties and their descriptions can be found in the QM User Manual.

1.4.2. Getting a QueueMetrics temporary licence

We believe that the best way appreciate what QueueMetrics is and how useful it is for you is to try it with your own production system. That’s why we give a 30-day free evalutation key that you can use freely.

You can get it from: http://queuemetrics.com/sendDemoLicence.jsp and it includes installation instructions.