2024.2 OnPremises Prerequisite Software for Linux and Kubernetes

Use this article to install and configure prerequisite applications before you install qTest 2024.2 OnPremises on a native Linux (RHEL or Ubuntu) machine, non-Docker. These prerequisite applications apply both to a single server or load balancing server.

  • (Required) Install PostgreSQL 13.x

    If installing PostgreSQL with SSL connections to encrypt client or server communications for increased security, a root certificate authority (root.crt) must be created and placed in application node servers with read and write permission. This certificate will be asked when configuring application with Command Line Wizard. 

  • (Required) Install Elasticsearch 7.10

We provide a range of supported versions for the prerequisite components so that OnPremises customers can easily maintain qTest OnPremises over time. This reduces the need for you to upgrade every prerequisite component each time you upgrade qTest to the most recent version.

Ports

Please note, that you must open the ports below prior to any self-assisted installation or upgrade.

Prerequisite applications

Product Port
PostgreSQL 5432 (TCP)
Elasticsearch 

9200 (TCP)

9300 (if using ES Clustering)

Network File System (NFSV4) 2049 (TCP and UDP)

Install PostgreSQL on Yum-Based Linux OS

Please note, the following installation steps are for example only using PostgreSQL 13.x. Please refer to the instructions in the PostgreSQL official documentation for full details.

Install PostgreSQL

Refer to the official documentation for detailed instructions for YUM installation.

Please note to use the following command to install both Postgres server and extension, rather than only the server as in the guide.

Notes

  • PostgreSQL must be installed as root or by a user with sudo permissions

  • Complete a YUM update prior to installing PostgreSQL

  • (Optional) Exclude PostgreSQL packages from /etc/yum.conf to prevent pulling packages from the RHEL repository

  • Install yum-utils if not already present

  • You must set the password for the "postgres" user and any other superusers

  • Configurations can be completed on Linux CLI or within the PSQL interactive shell

  • In the examples, [ ] indicates a variable value that must be entered

  • qTest does not support special characters in the PostgreSQL user password

  • If you are installing on an AWS EC2 instance, pre-install the following packages: perl-libs. libicu, libxslt.

# Install PostgreSQL Official Repositories

yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

# Update YUM Configuration Manager – Disable Non-PG13

yum-config-manager --disable pgdg11 pgdg12 pdgg14 pgdg15

# Update YUM Configuration Manager – Enable PG13

yum-config-manager --enable pgdg13

# Install PostgreSQL Server and Contributor Packages

yum -y install --disablerepo=* --enablerepo=pgdg13 postgresql*-server postgresql*-contrib

# Initialize the Database Cluster

/usr/pgsql-13/bin/postgresql-13-setup initdb

# Enable Start on Boot

systemctl enable postgresql-13

# Start PostgreSQL Server

systemctl start postgresql-13

Change User's Password

# Change Password for ‘postgres’ User from Linux CLI

sudo -Hiu postgres psql -U postgres -Atc "alter user postgres with password '[password]'"

# (Optional) Change Password for ‘postgres’ User from PSQL Shell

##psql> \password

Change PostgreSQL Server Listen Address

# Locate postgresql.conf File from Linux CLI

sudo -Hiu postgres psql -U postgres -Atc "select setting from pg_settings where setting ~* 'postgresql.conf'"

# (Optional) Locate postgresql.conf file from PSQL Shell

##psql> select setting from pg_settings where setting ~* ‘postgresql.conf’;

Edit the postgresql.conf file with any text editor. Change the following setting and save.

listen_address=’*’

Add Remote Access Permission

# Locate pg_hba.conf File from Linux CLI

sudo -Hiu postgres psql -U postgres -Atc "select setting from pg_settings where setting ~* 'pg_hba'"

# (Optional) Locate pg_hba.conf file from PSQL Shell

##psql> select setting from pg_settings where setting ~* ‘pg_hba’;

Notes

  • You may specify a single remote connection in this file or allow connections from all IP ranges

  • Using this example, user authentication is still required when allowing connections from all IP ranges

  • IP addresses and ranges MUST be entered in full CIDR format (0.0.0.0/0)

  • Both scram-sha-256 and md5 are supported by qTest. Please ensure you use the correct method in the pg_hba.conf file

Edit the pg_hba.conf file with any text editor. Edit or add the following row and save.

# IF NO TLS

host all all 0.0.0.0/0 scram-sha-256

# IF USING TLS

hostssl all all 0.0.0.0/0 scram-sha-256

Reload PostgreSQL Configuration

After making these configuration changes, restart PostgreSQL to load the changes.

# Restart PostgreSQL

systemctl restart postgresql-13

Install PostgreSQL on APT-Based Linux OS

The following installation steps are for example only using PostgreSQL 13.x. Please refer to the instructions in the PostgreSQL official documentation for full details.

Install PostgreSQL

Refer to the official documentation for detailed instructions and options for Ubuntu (apt) installation.

Notes

  • PostgreSQL must be installed as root or by a user with sudo permissions

  • Complete an apt update/upgrade prior to installing PostgreSQL

  • Follow the official instructions for creating apt repositories for your specific version of Ubuntu

  • This example is using Ubuntu 18.04 LTS

  • Ubuntu completes database initialization and service start during the installation

# Add PostgreSQL APT Repository

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

sudo apt-get update

# Install PostgreSQL Server and Contributor Packages

apt-get install -y postgresql-13

# Enable Start on Boot

systemctl enable postgresql.service

Configure PostgreSQL for Ubuntu

After installation, there are basic configurations required for qTest applications to function.

Configuration Notes:

  • You must set the password for the "postgres" user and any other superusers

  • Configurations can be completed on Linux CLI or within the PSQL interactive shell

  • In the examples, [ ] indicates a variable value that must be entered

  • qTest does not support special characters in the PostgreSQL user password

Change User's Password

# Change Password for ‘postgres’ User from Linux CLI

sudo -Hiu postgres psql -U postgres -Atc "alter user postgres with password '[password]'"

# (Optional) Change Password for ‘postgres’ User from PSQL Shell

##psql> \password

Change PostgreSQL Server Listen Address

# Locate postgresql.conf File from Linux CLI

sudo -Hiu postgres psql -U postgres -Atc "select setting from pg_settings where setting ~* 'postgresql.conf'"

# (Optional) Locate postgresql.conf file from PSQL Shell

##psql> select setting from pg_settings where setting ~* ‘postgresql.conf’;

Edit the postgresql.conf file with any text editor. Change the following setting and save.

listen_address=’*’

Add Remote Access Permission

# Locate pg_hba.conf File from Linux CLI

sudo -Hiu postgres psql -U postgres -Atc "select setting from pg_settings where setting ~* 'pg_hba'"

# (Optional) Locate pg_hba.conf file from PSQL Shell

##psql> select setting from pg_settings where setting ~* ‘pg_hba’;

Notes

  • You may specify a single remote connection in this file or allow connections from all IP ranges

  • Using this example, user authentication is still required when allowing connections from all IP ranges

  • IP addresses and ranges MUST be entered in full CIDR format (0.0.0.0/0)

  • Both scram-sha-256 and md5 are supported by qTest. Please ensure you use the correct method in the pg_hba.conf file

Edit the pg_hba.conf file with any text editor. Edit or add the following row and save.

# IF NO TLS

host all all 0.0.0.0/0 scram-sha-256

# IF USING TLS

hostssl all all 0.0.0.0/0 scram-sha-256

Reload PostgreSQL Configuration

After making these configuration changes, restart PostgreSQL to load the changes.

# Restart PostgreSQL

systemctl restart postgresql.service

Create qTest Databases

Databases should be created prior to installing qTest. If you are not using the "postgres" user, please ensure that you create the databases as the alternate superuser.

Database Creation

Notes

  • The databases MUST be created by the superuser that qTest will use to access PostgreSQL

  • Database names are configurable, but a simple naming scheme is recommended

# Create Databases from Linux CLI using SQL file

cat > /tmp/createdb.sql << EOF

create database qtest;

create database sessions;

create database parameters;

create database pulse;

EOF

sudo -Hiu postgres psql -U postgres -f /tmp/createdb.sql

rm /tmp/createdb.sql

# Create Databases from Linux CLI

sudo -Hiu postgres psql -U postgres -c "create database qtest"

sudo -Hiu postgres psql -U postgres -c "create database sessions"

sudo -Hiu postgres psql -U postgres -c "create database parameters"

sudo -Hiu postgres psql -U postgres -c "create database pulse"

# Create Databases from PSQL Shell

##psql > create database qtest;

##psql > create database sessions;

##psql > create database parameters;

##psql > create database pulse;

# Show Databases After Creation from Linux CLI

sudo -Hiu postgres psql -U postgres -c "select datname from pg_database"

# Show Databases After Creation from PSQL Shell

##psql > \l

Configure PostgreSQL TLS (RHEL and Ubuntu)

For detailed instructions and information about transport layer security (TLS) configuration options for PostgreSQL, please refer to the official documentation. Please prepare CA-signed certificates and keys prior to completing this configuration.

TLS Configuration

Notes

  • You may use the default path to store certificates or choose your own path.

  • Please verify the permissions and ownership of the certificate, key, and path before proceeding. This may vary depending on the environment.

  • If ONLY using TLS connections, remove any non-TLS entry made during previous steps in the pg_hba.conf file.

# Enable TLS in postgresql.conf

ssl = on

ssl_cert_file = ‘[/path/to/certificate]’

ssl_key_file = ‘[/path/to/key]’

# Enable Remote Access for TLS Users in pg_hba.conf

hostssl all all 0.0.0.0\0 scram-sha-256

# Restart PostgreSQL

systemctl restart postgresql-13

# Restart PostgreSQL (Ubuntu)

systemctl restart postgresql.service

Restart PostgreSQL

Run the following command to restart PostgreSQL:

sudo systemctl restart postgresql

Install Elasticsearch on YUM-Based Linux OS

Please note, that the example installations below, provide the recommended install version. However, you can use a prerequisite version different than these examples as long as the prerequisite version falls within the range of supported versions listed above.

All commands need to be executed under root user.

RHEL

Since 7.x, Elasticsearch provides a bundle-jdk with the installation package. It is no longer required to have JDK pre-installed. If the server already has JDK installed, we strongly recommend to uninstall it and clean env's variable JAVA_HOME. Otherwise, it will conflict with the bundle-jdk above.
  1. Install Elasticsearch using rpm. Official reference: https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html

  2. Import PGP Key

    rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
  3. Create file /etc/yum.repos.d/elasticsearch.repo with content:

    [elasticsearch]

    name=Elasticsearch repository for 7.x packages

    baseurl=https://artifacts.elastic.co/packages/7.x/yum

    gpgcheck=1

    gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch

    enabled=0

    autorefresh=1

    type=rpm-md

  4. Install from Elasticsearch repo

    yum install --enablerepo=elasticsearch elasticsearch
  5. Change the Elasticsearch configuration so it allows connections from outside of the server.

    echo 'network.host: 0.0.0.0' >> /etc/elasticsearch/elasticsearch.yml
  6. Configure Elasticsearch configuration for single deployment

    echo 'discovery.type: single-node' >> /etc/elasticsearch/elasticsearch.yml
  7. Start Elasticsearch services

    systemctl enable elasticsearch

    systemctl restart elasticsearch

Please refer to the official installation instructions of Elasticsearch for further information.

After you install Elasticsearch, make sure you configure the default JVM heap size for Elasticsearch.

Install Elasticsearch on Apt-Based Linux OS

Please note, that the example installations below, provide the recommended install version. However, you can use a prerequisite version different than these examples as long as the prerequisite version falls within the range of supported versions listed above.

All commands need to be executed under root user.

Ubuntu

Since 7.x, Elasticsearch provides a bundle-jdk with the installation package. It is no longer required to have JDK pre-installed. If you have already installed the Java Development Kit (JDK) on your server, we strongly recommend you uninstall it and clean the JAVA_HOME environment variable. Otherwise, it will conflict with the bundle-jdk above.
  1. Install Elasticsearch using deb. Official reference: https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html

  2. Import PGP Key.

    wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

  3. Install from Elasticsearch repo

    sudo apt-get install apt-transport-https

    echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list

    sudo apt-get update

    sudo apt-get install elasticsearch

  4. Change the ElasticSearch configuration so it allows connections from outside of the server.

    echo 'network.host: 0.0.0.0' >> /etc/elasticsearch/elasticsearch.yml

  5. Configure ElasticSearch configuration for single deployment

    echo 'discovery.type: single-node' >> /etc/elasticsearch/elasticsearch.yml

  6. Start Elasticsearch services

    systemctl daemon-reload

    systemctl enable elasticsearch

    systemctl start elasticsearch

Refer to the official installation instructions of Elasticsearch for further information.

After you install Elasticsearch, make sure you configure the default JVM heap size for Elasticsearch.