Installation Document for QMetry Test Management v7.4 - Linux OS


These instructions have been updated for QMetry 7.0.

Thank you for choosing QMetry as your Test Management Tool. This guide will help you walk through the installation steps and get your QMetry system up and running on Linux Operating System. 

This guide, and the accompanying software and other documentation are protected by U.S. and international copyright laws, and may be used only in accordance with the accompanying license agreement. Features of the software, and of other products and services of QMetry, may be covered by one or more of the following pending patents all rights reserved. The absence of a trademark from this list does not constitute a waiver of QMetry’s intellectual property rights concerning that trademark. All other company, brand and product names may be trademarks or registered trademarks of their respective holders. QMetry disclaims any responsibility for specifying which marks are owned by which companies or which organizations. QMetry provides links to external third-party Web sites to help you find supplemental information. Site content and availability may change without notice. QMetry makes no representations or warranties whatsoever as to site content or availability. © 2008 - 2017 QMetry. All rights reserved. 


Hardware Requirements

We offer support for new installations on the operating systems and architectures mentioned below:

Component Minimum Recommended
Operating System

RHEL 7/CentOS 7 - 64 bit

CentOS 7 - 64 bit [Note: QMetry Installation is certified on CentOS-7-x86_64-DVD-1611.iso]

Memory 8 GB RAM 16 GB RAM
Disk Space 250 GB HDD 500 GB HDD
CPU 4 8
Processor 2.4 GHz or better 3.46 GHz
Disk I/O  200MB/s  400MB/s 

Software Requirements

  • JDK must be installed. The version of the JDK must be 1.8
  • To verify, run command: java -version on server
  • Perl modules must be installed for Database. To install, run command: yum install perl-DBD-MySQL.x86_64

Set JAVA_HOME and PATH on Linux

  • If Java is not installed on server, then you can follow below steps to install java:
    • To install Java
      • Run command: yum install java-1.8.0-openjdk
    • To find path of installed Java
      • Run command: which java to find out exact path to Java executable
    • To set JAVA_HOME variable
      • Run command: export JAVA_HOME=/usr/java/jdk1.8.0_131  (Note: You need to add the path of your Java installation directory)
    • To set PATH variable
      • Run command: export PATH=$PATH:$JAVA_HOME/bin
    • To change above settings permanently which stays even after machine reboot
      • Run command: sudo vi /etc/profile then add below two lines at last:
      • export JAVA_HOME=/usr/java/jdk1.8.0_131(Note: Add the path of your Java installation directory)
      • export PATH=$PATH:$JAVA_HOME/bin
      • Save configuration with Esc + :wq!
    • To verify Java Version
      • Run command: java -version

 Set Java Cryptography Extension (JCE)

Installation Guide

This guide describes step by step QMetry installation on Linux server.

Before You Begin 

  • QMetry Version:
  • QMetry should be running on a dedicated server.
  • QMetry installation will install all of the services it needs. 
  • Verify that your server meets the requirements specified in Pre-requisites
  •  QMetry is not supported on any other version of Payara. If you already have  Payara 4.1 installed be aware that if there are other applications already running on the Payara server performance issues might arise. We recommend a separate Payara server for QMetry.

  • If you have already installed MySQL Database Server, then it must be MySQL 5.6 (Note: For existing MySQL, if there are other application databases installed, then performance issues might arise)
  • Make sure no java or mysql process already running on server before starting installation
    • Run command: ps aux | grep java
    • Run command: ps aux | grep mysql
    • If found any services already running, kill them by running command: kill <process-id>
  • We recommend to install QMetry with "qmetry" user under it's home directory. 
    • Run below commands to add "qmetry" user and group:
      • groupadd qmetry
      • useradd -g qmetry qmetry
      • passwd qmetry
  • Please make sure "qmetry" user has sudo access. It means "qmetry" user must have an entry in /etc/sudoers file. You can run below command:
    • echo 'qmetry ALL=(ALL:ALL) ALL' >> /etc/sudoers

Note: Infostretch regularly updates our components version after new versions are released. We do not expect new versions to cause any problems; however, it is important to ensure stability and quality. If a new version of a components is available and you would like to use it please contact us at first. We will investigate to make sure that you will encounter no problems.

Set System Parameters

  • Verify ulimit by command ulimit -n if it is less than 2048 then apply the below command.

    • Run command : ulimit -n 2048
  • Run command : vi /etc/sysctl.conf
    • Add or update below values
      • net.ipv4.ip_local_port_range = 2000 65000
      • kernel.sem = 250 32000 100 128

Installing QMetry

  • Download (Reference URL :
  • It contains database related files i.e. qmetry.sql & emailnotification.sql.
  • It contains applications related files i.e., qmetry.ear , EmailNotificationService.war & robots.txt

Installing MySQL 5.6  

  1. Go to
  2. Click on link : Looking for previous GA versions?
  3. Select Platform: Linux - Generic and version: 5.6.xx from the drop-downs.
  4. Click on Download for "Linux - Generic (glibc 2.5) (x86, 64-bit), Compressed TAR Archive"
  5. Click on "No thanks, just start my download." link available at the bottom of the page. This will start the download process.
  6. Once completed, you can transfer downloaded file under /opt/ directory on your server.
  7. You can follow below steps to install MySQL 5.6 on your server and run commands given for each step:
    1. Add "mysql" user and group with "root" user:
      1. userdel mysql
      2. groupadd mysql
      3. useradd -r -g mysql mysql
      4. sudo mv /etc/my.cnf /etc/my_bak.cnf
    2. Extract and Install MySQL:
      1. cd /opt/
      2. tar zxvf mysql-5.6.xx-linux-glibc2.5-x86_64.tar.gz   (Make sure you give correct name here as per your downloaded package)
      3. ln -s /opt/mysql-5.6.xx-linux-glibc2.5-x86_64 mysql
      4. cd mysql
      5. scripts/mysql_install_db --datadir=/opt/mysql/data
    3. Configure MySQL - Edit "my.cnf" and make sure [mysqld] section contains below given values:
      1. vi my.cnf
        • [mysqld]
        • port=3306
        • basedir=/opt/mysql
        • datadir=/opt/mysql/data
        • skip-external-locking
        • lower_case_table_names=1
        • max_allowed_packet = 512M
        • innodb_thread_concurrency=10
        • query_cache_limit=1073741824

        • query_cache_type =1

        • table_definition_cache =2000

        • table_open_cache =2000

        • thread_cache_size =200

        • thread_concurrency =200

        • group_concat_max_len = 15360
        • innodb_autoinc_lock_mode=2
        • binlog_format=row
        • transaction-isolation=READ-COMMITTED
      2. Comment out below parameter: 
      3. Save the configuration: Esc + :wq!  (Hit Enter)
    4. Install MySQL as a Service - execute below commands in sequence:
      1. cd /opt/mysql
      2. sudo chown -R mysql:mysql .    (Don't forget, there is dot at last, "." in this command)
      3. sudo cp my.cnf /etc/
      4. sudo cp -rf /opt/mysql/bin/my_print_defaults /usr/bin/
      5. sudo cp -rf /opt/mysql/support-files/mysql.server /etc/init.d/mysql
      6. sudo chmod +x /etc/init.d/mysql
      7. sudo chkconfig --add mysql
      8. service mysql start
    5. QMetry Database Installation:
      1. Get the downloaded "qmetry.sql" file and put it under /opt/
      2. Get the downloaded "emailnotification.sql" file and put it under /opt/
      3. To change root password for mysql database: 
        • /opt/mysql/bin/mysqladmin -u root password 'qmetry'
      4. Restore QMetry Database: 
        • /opt/mysql/bin/mysql -uroot -pqmetry < /opt/qmetry.sql
      5. Restore Email Notification Service Database: 
        • /opt/mysql/bin/mysql -uroot -pqmetry < /opt/emailnotification.sql
      6. Login to database and update domain name as follows:
        • /opt/mysql/bin/mysql -uroot -pqmetry
        • mysql> USE qmetry;
        • mysql> UPDATE client SET domain='<your-server-ip-or-domain>:8080' limit 1;
        • mysql> \q

Installing Payara Server 4.1

  1. Go to 
  2. Download "Payara Server Full 171" and Transfer it to server at /home/qmetry/ directory. 
  3. Before installing Payara Application Server: 
    1. Make sure Java installed and configured properly as mentioned in Set JAVA_HOME and PATH on Linux
    2. Free Ports Required: 4848 (Administration Console), 8080 (HTTP), 8081 (HTTPS)
    3. You can check this by running command: netstat -tlpn
  4. Connect to the server with "qmetry" user. (OR you can run command: su qmetry to switch to "qmetry" user.)
  5. Go to /home/qmetry/ directory and Unzip the file: unzip
    Payara Server 4.1 will be extracted into a new "payara41" directory under your current directory
  6. Go to and select platform: "Platform Independent"
    1. Click on Download for "Platform Independent (Architecture Independent), Compressed TAR Archive"
    2. Click on "No thanks, just start my download." link available at the bottom of the page. This will start the download process.
    3. Transfer it to /home/qmetry/ directory on server and run below commands:
      1. tar zxvf mysql-connector-java-5.x.xx.tar.gz
      2. sudo cp mysql-connector-java-5.x.xx/mysql-connector-java-5.x.xx-bin.jar payara41/glassfish/lib/
  7. Execute below commands in sequence:
    1. cd /home/qmetry/
    2. chmod +x payara41/bin/asadmin
    3. payara41/bin/asadmin start-domain
    4. payara41/bin/asadmin --port 4848 change-admin-password   [default username: admin | default password is blank]
    5. payara41/bin/asadmin --port 4848 enable-secure-admin
    6. payara41/bin/asadmin stop-domain
    7. cd payara41/glassfish/domains/domain1/osgi-cache/felix 
    8. rm -rf *
  8. Get the downloaded "" file and transfer it to /home/qmetry/:
    1. cd /home/qmetry/
    2. unzip 
    3. sudo cp -rf eclipselink/*.jar payara41/glassfish/modules/
    4. payara41/bin/asadmin start-domain
  9. Launch web browser and Login to Administration Console : http://<your-server-ip>:4848 
  10. Go to Configurations > server-config > Logger Settings
    1. Set Maximum History Files = 20
    2. Click on Save
  11. Go to Configurations > server-config > JVM Settings > JVM Options
    1. Click on "Add JVM Option" and add or update below values
      1. -Duser.timezone=UTC
      2. -server     (Replace -client with -server value)
      3. -Xmx2048m  (Replace -Xmx512m with this new value)
      4. -Xms1024m
      5. -XX:PermSize=200m
      6. -XX:MaxPermSize=512m  (Replace -XX:MaxPermSize=192m with this new value)
    2. Click on Save
  12. Restart Payara server. To restart Payara server: 
    • payara41/bin/asadmin stop-domain 
    • payara41/bin/asadmin start-domain

Moving Database resources out of the Application context

  • Get the values of hostname, port, database name, username, password for Database connection.
  • run command : #/payara41/bin/asadmin
Script for generating Connection Pool note
  • run command : create-jdbc-connection-pool --driverclassname com.mysql.jdbc.Driver --restype java.sql.Driver --property user=<username>:password=<password>:url="jdbc\:mysql\://<hostname>\:<port>/<database name>?zeroDateTimeBehavior\=convertToNull&autoReconnect\=true" qmetry-connection-pool
  • Example : Values of <username> is root , <password> is qmetry , <hostname> is localhost , <port> is 3306 & <database name> is qmetry then your command will be :
    • create-jdbc-connection-pool --driverclassname com.mysql.jdbc.Driver --restype java.sql.Driver --property user=root:password=qmetry:url="jdbc\:mysql\://localhost\:3306/qmetry?zeroDateTimeBehavior\=convertToNull&autoReconnect\=true" qmetry-connection-pool

NOTE : Update the script by checking the values in glassfish-resources.xml

Expected Output : Command create-jdbc-connection-pool executed successfully.

Script to check the connection note
  • run command : ping-connection-pool qmetry-connection-pool

Expected Output : Command ping-connection-pool executed successfully.

Script for generating datasource note
  • run command : create-jdbc-resource --connectionpoolid qmetry-connection-pool jdbc/qmetry-ds

Expected Output : JDBC resource jdbc/qmetry-ds created successfully. Command create-jdbc-resource executed successfully.

Verification through Payara administration console
  • Launch web browser and Login to Administration Console : http://<your-server-ip>:4848 
  • Go to Resources>>JDBC>>JDBC Connection Pools
  • Click on qmetry-connection-pool>>Additional Properties
  • Check the respective values.

Deploying QMetry & Email Notification Service 

  • Get the downloaded "qmetry.ear" and "EmailNotificationService.war" files and put it under /home/qmetry/ directory.
  • Connect to server and run below commands:
    • /home/qmetry/payara41/bin/asadmin
    • asadmin>deploy /home/qmetry/qmetry.ear     (Note: Enter admin username and password)
      • Enter Admin Username>
      • Enter Admin Password>
    • asadmin>deploy /home/qmetry/EmailNotificationService.war     (Note: Enter admin username and password)
      • Enter Admin Username>
      • Enter Admin Password>
      • asadmin>exit
  • Run below commands to configure attachments:
    • cd /home/qmetry/
    • mkdir attachments

Update Email Notification URL

  • Update client table with the Email Notification URL by running below query :
    • Case-1 : If QMetry is running on port 80, then run query : UPDATE client set EmailDomainURL = 'http://[QMetry_URL OR IP]/EmailNotificationService' ; 
    • Case-2 : If QMetry is running on port 8080 , then run query : UPDATE client set EmailDomainURL = 'http://[QMetry_URL OR IP]:8080/EmailNotificationService' ; 
  • NOTE : Don't use backward slash at the end of the email_notification_url.

Steps to apply license file

Once you have received your license file from support, follow the below steps to apply it to your server:

  • Place license file "license.key" at "payara41/glassfish/domains/domain1/config"
  • Restart payara server. To restart payara server: 
    • payara41/bin/asadmin stop-domain 
    • payara41/bin/asadmin start-domain

Steps to configure poifiles for Export functionality

Connect to server and run below commands:

    • cd /tmp/
    • mkdir poifiles
    • chmod +x poifiles

Setting robots.txt file on the server

  • Get the downloaded "robots.txt" file.
  • Put it in the folder : /opt/payara41/glassfish/domains/domain1/docroot/

Configuring SSL/TLS in Payara & QMetry1

Step 1 to 11 are for installation & configuration SSL Certificates.

Prerequisite : Payara uses master admin password as "changeit" (default password). If you wish to change the password then you need to update Payara master admin password.

Step 1: Change directory

Command : cd /opt/payara41/glassfish/domains/domain1/config/

Step 2 : Generate key and csr file

Command : openssl req -new -newkey rsa:2048 -nodes -keyout qmetry.key -out qmetry.csr
* Here we have used default password ( changeit )

Step 3 : Fill information required for certificate request.

Country Name (2 letter code) [XX]:US
State or Province Name (full name) []:California
Locality Name (eg, city) [Default City]:Santa Clara
Organization Name (eg, company) [Default Company Ltd]:Infostretch Corporation
Organizational Unit Name (eg, section) []:QMetry
Common Name (eg, your name or your server's hostname) []:*
Email Address []
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:changeit
An optional company name []:QMetry

Step 4 : Give CSR to CA and get SSL Certificate

Step 5 : Extract CA certificates

Go to /opt/payara41/glassfish/domains/domain1/config/
Command : unzip

Step 6 : Merge domain certificate and intermediate certificate

Command : cat certs/star_qmetry_com.crt  certs/DigiCertCA.crt certs/TrustedRoot.crt  > qmetry.crt

Step 7 : Create PKCS12 keystore using openSSL

Command : openssl pkcs12 -export -in qmetry.crt -inkey qmetry.key -out qmetry.p12 -name

Step 8 : Now import PKCS12 keystore "qmetry.p12" to Java Keystore "keystore.jks"

Command : keytool -importkeystore -deststorepass changeit -destkeypass changeit -destkeystore keystore.jks -srckeystore qmetry.p12 -srcstoretype PKCS12 -srcstorepass changeit -alias

Step 9 : Now "keystore.jks" will have two certificates

payara41's self-signed certificate with Nickname : s1as
CA certified certificate with Nickname :

Step 10 : Update http listeners in payara admin console & change certificate Nick Name

Open Payara admin console Browse: http://hostname:4848

  • Click on Configuration ->  Server-config -> http listener2  and General tab change port number 8181 to 443 then click on SSL tab change certificate Nick Name s1as to or your appropriate domain name.
  • Click on Configuration ->  Server-config -> admin listener  and General tab change port number 8080 to 443 then click on SSL tab change certificate Nick Name s1as to or your appropriate domain name
  • Save and restart Payara services



Note: If you intend to integrate JIRA with QMetry, while JIRA running on HTTPS, QMetry is also required to run on HTTPS to make the linkage between JIRA and QMetry to work properly.

Configure QMetry to run over HTTPS but you do not have SSL certificate available1

By default, http-listener-2 is configured in Payara in server-config. The port set is 8181 as shown in the below image.

Payara Configuration

If one tries to access the QMetry application, e.g. URL https://localhost:8181/qmetry , then QMetry login page opens as below .

When you enter the credentials, an error message “Invalid Client” pop's up, as highlighted in below mentioned image.

QMetry Invalid client error

To solve this issue, the domain URL has to be set in the client table in QMetry database as follow :

Login to database and update domain name as follows: 

    • /opt/mysql/bin/mysql -uroot -pqmetry
    • mysql> USE qmetry;
    • mysql> UPDATE client SET domain='localhost:8181' limit 1;
    • mysql> \q

If ports used for QMetry are : 80 for HTTP & 443 for HTTPS, then port number will not present in the domain URL, so no change is required in the domain URL.


The documentation regarding Certificates & SSL in Glassfish 4.0 Open Source edition(same document applies for Payara 4.1) is in the Security Guide, in the following sections:

  • Section “Certificates and SSL”, page 1-10
  • Section “Firewalls”, page 1-9

If mod_jk is being used, then the relevant documentation is in the Glassfish Administration Guide, section “Administering mod_jk”.

Reference link for Glassfish(same document applies for Payara 4.1) documentation : 

Starting QMETRY 

You can access QMETRY from any computer with network access to your QMETRY server by opening a supported web browsers on the computer and visiting this URL: 

  • http://<domain_name>:<port_number>/qmetry 


  • <domain_name> is the name which you gave at the time of installation.
  • The default QMetry Login Credentials are: admin/qmetry1@#4, automation/qmetry1@#4

Verify QMetry URL

If your QMetry is running on secure http protocol then enable the option of HTTPS.

  • Go to Admin>>General settings>>Secure Http settings.
  • Enable the checkbox of HTTPS.

QMetry On-Demand

If you do not have the resources to set up and maintain a QMetry installation locally, consider QMetry hosted solution. We can run and maintain your installation of QMetry, handling all the testing, monitoring and upgrading processes for you. For more information, please refer to the information about QMetry On-Demand on our website. 

Contact QMetry 

Please contact QMetry if you face any issues during installation. You can email us at which will automatically create a ticket in our support portal which will allow all of us to monitor the status on the issue until it is resolved. 

1:Note: If you intend to integrate JIRA with QMetry, while JIRA running on HTTPS, QMetry is also required to run on HTTPS to make the linkage between JIRA and QMetry to work properly.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk