Use this article to install and configure prerequisite applications before you install qTest OnPremise (Spring 2018 release) on a Windows machine. These prerequisite applications apply both to a single server or load balancing server.
There are 5 required prerequisites:
- PostgreSQL - 9.5.4 to 9.6.6
- Redis - 2.8.19 to 3.2.10
- RabbitMQ - 3.5.4 to 3.7
- Erlang - dependant on RabbitMQ version
- MongoDB - 3.2 to 3.6 (needed for Parameters, Scenario, and Pulse)
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.
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.
Install PostgreSQL 9.5
Follow the Postgre website for installation instructions.
Configure PostgreSQL 9.5
Once PostgreSQL is installed, follow steps below to enable remote access to PostgreSQL database server:
- Open file C:\Program Files\PostgreSQL\9.5\data\pg_hba.conf.
- Edit the file and append the following line to specify the IP of the server which will remotely connect to your PostgreSQL.
host all all [IP_Address] md5
- This should be the server 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.
- 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.
listen_addresses = '*'
Download Redis 2.8.19
Download Redis 2.8.19 (minimum version supported) from this link.
- After downloading the package, extract it to a folder on your machine.
- Create a directory for Redis' heap.
Example: "D:\Redis Heap"
- In the extracted folder, open file redis.windows.conf.
- Search for and update the following line:
- # maxheap
- Remove the # and specify a max heap size.
- The size is half the volume of your server RAM.
Example: if my server's RAM is 8GB, then:
- # heapdir
- Remove the # and specify your directory path.
- The directory's free space should be larger than (RAM + 2*maxheap).
heapdir "D:\Redis Heap"
- # maxheap
- Open your console as an Administrator.
- Change the current path to:
- Execute the following command:
C:\redis-2.8.19>redis-server --service-install redis.windows.conf --loglevel verbose
- Start the service:
- Default Redis port is 6379. Make sure that the port is available. Click here for the instruction to check which ports are available.
- Make sure that the port is not blocked by your firewall.
Verify Redis Installed Successfully
- Type services.msc in the "Start\Search box", then Enter.
- From the Services window, ensure Redis is running.
Erlang is a dependency of RabbitMQ. Download and install Erlang by following this article. Make sure to download the correct version of Erlang that corresponds to your RabbitMQ version. For more info, check out: Which Erlang?
Install RabbitMQ 3.5.4
Download RabbitMQ 3.5.4.
Once RabbitMQ is installed, follow the steps below to configure:
- Open the command prompt as an Adminstrator and navigate to [RabbitMQ_Installation_Directory]\sbin\.
Example: C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.5.4\sbin
- Execute these 2 commands:
rabbitmq-plugins enable rabbitmq_stomp
rabbitmq-plugins enable rabbitmq_management
- Open your browser and navigate to http://localhost:15672.
- Login with username and password as guest/guest.
- Navigate to the Admin tab and select the Users panel.
- Expand the Add a user section.
- Add a new user.
- Select the Virtual Hosts panel.
- Expand the Add a new virtual host section.
- Enter a host name and select Add virtual host to add a new host.
- Expand All virtual hosts section.
- Select the 'virtual host' you created to grant users access.
- Expand the Permissions section.
- Select the user you created in step #7.
- Input. * in Configure regexp, Write regexp and Read regexp as in the image below.
- Select the Set permission button to grant access.
- Navigate to the Overview tab.
- Expand the Port and contexts section.
Hint: Write down the amqp port number and the stomp port number. You will need to use them while installing qTest Manager.
- Expand the Port and contexts section.
Install MongoDB 3.4
qTest Parameters, Scenario, and Pulse require you to install MongoDB 3.4.
- Install MongoDB 3.4.
Hint: Keep a record of the designated username and password used for root user creation.
- After the download is complete, double-click the MongoDB 3.4 file and follow the installation wizard to install.
- When the installation completes, make sure MongoDB’s bin folder is added to the System Environment Variables.
MongoDB requires a data directory to store all data.
- Create the data directory folder by running the following command in a Command Prompt:
- Start MongoDB as an Administrator with the following command:
mongod --dbpath [PATH\TO\DB\FOLDER] --reptSet "rs0"Note: if your path includes spaces, enclose the entire path with double quotes.
mongod --dbpath C:\data\db --replSet "rs0"
Create root user
- Open a second Command Prompt as an Administrator and execute the below command to create a root user:
- Close both Command Prompt windows.
Run MongoDB as a Windows Service
- Open a new Command Prompt as an Administrator.
- Create a folder for log files:
- Create a configuration file at MongoDB installation folder:
Example: C:\Program Files\MongoDB\Server\3.4\mongod.cfg.
- Open your favorite text editor as an Administrator and edit the file as following:
systemLog: destination: file path: [PATH\TO\LOG\FOLDER] storage: dbPath: [PATH\TO\DB\FOLDER] replication: replSetName: rs0 security: authorization: enabled
systemLog: destination: file path: C:\data\log\mongod.log storage: dbPath: C:\data\db replication: replSetName: rs0 security: authorization: enabled
- Create the MongoDB service by running the following command:
sc.exe create MongoDB binPath="\"[MONGODB_INSTALLATION_FOLDER]\bin\mongod.exe\" --service --config=\"[PATH\TO\CONFIG\FILE]\"" DisplayName="MongoDB" start="auto"Example:
"C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe" --config "C:\Program Files\MongoDB\Server\3.6\mongod.cfg" --install
- Start the MongoDB service by running the following command as an Administrator:
net start MongoDB
If you would like to stop the MongoDB service, run the following command:
net stop MongoDB
- If you would like to remove the MongoDB service as needed, first stop the service and then run the following command:
sc.exe delete MongoDB
- Verify that MongoDB service is running by following the steps below:
- Open the Command Prompt as an Administrator and type services.msc to open the Services window.
- On the Services window, look for the service named MongoDB and make sure the Status is Running and the Startup Type is set to Automatic, as shown below.