Menu

Q4 2019 OnPremise: Prerequisite Software for Linux

Overview

Use this article to install and configure prerequisite applications before you install the Q4 2019 OnPremise deployment on a native Linux (CentOS or Ubuntu) machine, non-Docker. These prerequisite applications apply both to a single server or load balancing server.

There are 3 required prerequisites:

  • PostgreSQL 9.5.4 to 10
    • If installing PostgresSQL with SSL connections to encrypt client/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 the application with Command Line Wizard.  
  • ElasticSearch 6.5 to 6.8.1
    • Java 1.8
  • Install Fonts
    • In the previous OnPremise release, qtestctl 6.4 package, we moved from Oracle Jdk 1.8.0_144 to Open JDK 1.8.0_212. Several fonts, which were supported by Oracle, are no longer available. These missing fonts will cause certain qTest features to not work properly (Ex: export Excel.) 

Important: We provide a range of supported versions for the prerequisite components so that OnPremise customers can easily maintain qTest OnPremise 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
Postgres 5432
Elasticsearch 9200
Network Drive 2049

 

Install PostgreSQL on CentOS

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.

IMPORTANT:

  • All commands need to be executed under Root user.

Install

Follow this article to install PostgreSQL v9.5 on your CentOS server using 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.

# yum install postgresql95-server postgresql95-contrib
		

Enable Remote Access

After you have finished installing PostgreSQL, enable remote access to PostgreSQL database server:

  1. Search for file pg_hba.conf in Postgresql's installation directory.

    Typically stored at /var/lib/pgsql/x.y/data

    Example: /var/lib/pgsql/9.5/data
    # find /etc -name "pg_hba.conf" or find /var -name "pg_hba.conf"
    		
  2. Edit the file and append the following line, specify the IP of the server which will remotely connect to your PostgreSQL. This should be the servers where qTest packages are installed.

    If you want to allow connection from multiple client machines on a specific network, specify the network address here in the CIDR-address format: [IP Address]/[Netmask in bits]

    If you want your PostgreSQL to accept all incoming connections regardless of the source IP address, use 0.0.0.0/0 as the IP address.

    host all all [IP address]/[Netmask in bits] md5
    		


    You can define your specific PGSQL database host by running the ifconfig command on the PGSQL host on the appropriate network interface note the inet address which is IPV4 such as 192.168.0.255 and the netmask such as 255.255.255.0 (this is for the netmask calculation below.

    Calculation: An octet is any value between 0 - 255 of an IP address or a netmask that represents one of 4 possible decimal places in an IP or netmask such as 255.255.255.0. Note where each octet is 255. So in our example for each octet in the netmask that has 255, let that represent the value 8, which represents the number of bits in the netmask. In our example, we have 3 octets that are full octets so they will represent the full 8 bits so our netmask in bits will represent 24. For our example, the CIDR format will look like 192.168.0.255/24

    Warning: netmask calculations can quickly become complicated if the netmask has values other than 0 or 255. If your network interface has any values between 0 and 255, consult with your network team to determine the CIDR format for you PGSQL host.

  3. Search for file postgresql.conf in Postgresql's installation directory typically the same directory as pg_hba.conf
    # find /etc -name "postgresql.conf" or find /var -name "postgresql.conf"
    		
  4. Edit the above file. Search for property listen_address and modify it to (remove # at the beginning of the line if it is there.)
    listen_addresses = '*' 
    		

Change Postgres User's Password

IMPORTANT: 

  • qtestctl does not support special characters "#or "?" in your PostgreSQL password

Run the following commands to change the password:

# sudo -u postgres psql

postgres=# \password
Enter new password:
Enter it again:

Install PostgreSQL on Ubuntu

  IMPORTANT: All commands need to be executed under Root user

PostgreSQL is available in all Ubuntu versions by default. However, Ubuntu "snapshots" a specific version of PostgreSQL that is then supported throughout the lifetime of that Ubuntu version. Other versions of PostgreSQL are available through the PostgreSQL apt repository.

If the version included in your Ubuntu server is not v9.5, please refer to http://www.postgresql.org/download/linux/ubuntu/ to set the PostgreSQL Apt Repository.

Install

  1. From the terminal, run the following command to install PostgreSQL
    # apt-get update
    # apt-get install postgresql postgresql-contrib
    		
  2. Check for PostgreSQL's service name in your machine by the following command.
    # chkconfig
    		
  3. From the command's output, search for postgresql to get its full name.
    ...
    postgresql on //this is the full service name
    ...
    		
  4. Initialize the database using the PostgreSQL's service name you have found above.
    # chkconfig postgresql on
    # systemctl postgresql initdb
    		

Enable Remote Access

After you have finished the install for PostgreSQL, enable remote access to PostgreSQL database server:

  1. Search for file pg_hba.conf in Postgresql's installation directory.
    # find /etc -name "pg_hba.conf" or find /var -name "pg_hba.conf"
    		
  2. Edit the file and append the following line, specify the IP of the server which will remotely connect to your PostgreSQL. This should be the servers where qTest packages are installed

    If you want to allow connection from multiple client machines on a specific network, specify the network address here in the CIDR-address format[IP Address]/[Netmask in bits]

    If you want your PostgreSQL to accept all incoming connections regardless of the source IP address, use 0.0.0.0/0 as the IP address.

    host all all [IP address]/[Netmask in bits] md5
    		


    You can define your specific PGSQL database host by running the ifconfig command on the PGSQL host on the appropriate network interface note the inet address which is IPV4 such as 192.168.0.255 and the netmask such as 255.255.255.0 (this is for the netmask calculation below).

    Calculation: An octet is any value between 0 - 255 of an IP address or a netmask that represents one of 4 possible decimal places in an IP or netmask such as 255.255.255.0. Note where each octet is 255. So in our example for each octet in the netmask that has 255, let that represent the value 8, which represents the number of bits in the netmask. In our example, we have 3 octets that are full octets so they will represent the full 8 bits so our netmask in bits will represent 24. For our example, the CIDR format will look like: 192.168.0.255/24

    Warning: netmask calculations can quickly become complicated if the netmask has values other than 0 or 255. If your network interface has any values between 0 and 255, consult with your network team to determine the CIDR format for you PGSQL host.

  3. Search for file postgresql.conf in Postgresql's installation directory typically the same directory as pg_hba.conf
    # find /etc -name "postgresql.conf" or find /var -name "postgresql.conf"
    		
  4. Edit the above file. Search for property listen_address and modify it to (remove # at the beginning of the line if it is there.)
    listen_addresses = '*' 
    		

Change Postgres User's Password

IMPORTANT: 

  • qtestctl does not support special characters "#or "?" in your PostgreSQL password

Run the following commands to change the password:

# sudo -u postgres psql

postgres=# \password
Enter new password:
Enter it again:

Create qTest Databases in PostgreSQL Server

You need to create qTest databases in your PostgreSQL server which will be used when you configure qTest Manager, Sessions, Parameters, Sessions and Pulse.

The option below is using the 'postgres' username. In the event, you want to create a DB in Postgres with the non-default username of 'postgres' follow these instructions to create that new user.

  1. Access the PostgreSQLserver.
  2. Switch to postgres user.
    $ su postgres		
  3. Access the PostgreSQL shell.
    $ psql		
  4. List the existing databases to avoid creating a duplicate database.
    \l		
  5. Create a database that will be used for each qTest application you will be using i.e. Manager, Sessions, Parameters and Pulse.
  6. Take note of its name, as you will enter the database name in the Command Line Wizard when installing qTest applications.
    create database [database_name];		

Enable SSL Mode in Postgres

  1. Open file postgresql.conf located at postgres data directory, and change the following value:
    ssl = on # (change requires restart)
    ...
    ssl_cert_file = 'path_of_cerfiticate' # (change requires restart)
    ssl_key_file = 'path_of_private_key'
    ...
  2. Open file pg_hba.conf located at postgres data directory, append this line at the end of the file.
    hostssl all all [IP_Address] md5


    Eg. hostssl all all 0.0.0.0/0 md5

Restart PostgreSQL

Run the following command to restart PostgreSQL:
sudo systemctl restart postgresql

Install ElasticSearch on CentOS

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.

IMPORTANT: All commands need to be executed under root user.

Install Java JDK 1.8

Install Java JDK 1.8 prior to installing ElasticSearch.

yum install -y java-1.8.0-openjdk

Import/Install ElasticSearch

  1. Import the ElasticSearch PGP key.
    rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
  2. Create file /etc/yum.repos.d/elasticsearch.repo
    cat > /etc/yum.repos.d/elasticsearch.repo <<-EOF
    [elasticsearch-6.x]
    name=Elasticsearch repository for 6.x packages
    baseurl=https://artifacts.elastic.co/packages/6.x/yum
    gpgcheck=1
    gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
    enabled=1
    autorefresh=1
    type=rpm-md
    EOF
  3. Install ElasticSearch.
    yum install -y 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. By default, ElasticSearch uses port 9200. If you would like to change the default port, change the configuration by executing the following command, for example:
    echo 'http.port: 9201' >> /etc/elasticsearch/elasticsearch.yml
    NOTE: Please make sure that you select an available port in the server and open the port to allow inbound connections.
  6. Configure ElasticSearch as a service so it automatically starts with the OS.
    systemctl enable elasticsearch
  7. Restart ElasticSearch.
    systemctl restart elasticsearch

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

Install ElasticSearch on Ubuntu

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.

IMPORTANT: All commands need to be executed under root user

  1. Install Java JDK 1.8
    apt-get install java-1.8.0-openjdk.x86_64
  2. Import the ElasticSearch PGP key
    wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
  3. Install ElasticSearch (run following commands one by one.)
    sudo apt-get install apt-transport-https

    echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" |

    sudo tee -a /etc/apt/sources.list.d/elastic-6.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. By default, ElasticSearch uses port 9200. If you would like to change the default port, change the configuration by executing following command, for example :
    echo 'http.port: 9201' >> /etc/elasticsearch/elasticsearch.yml
    NOTE: Please make sure that you select an available port on the server and open the port to allow inbound connections
  6. Configure ElasticSearch as a service so it automatically starts with the OS (run following commands one by one.)
    sudo /bin/systemctl daemon-reload

    sudo /bin/systemctl enable elasticsearch.service
  7. Restart ElasticSearch (run following commands one by one)
    sudo -i service elasticsearch stop

    sudo -i service elasticsearch start

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

Powered by Zendesk