Overview
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.4 (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.
Ports
Please note, that you must open the ports below prior to any self/assisted installation or upgrade.
Prerequisite Applications |
|
---|---|
Product | Port |
RabbitMQ | 5672/61613 |
Redis | 6379 |
Postgres | 5432 |
Network Drive | 2049 |
MongoDB | 27017 |
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.
PostgreSQL
Install PostgreSQL 9.5
Follow the Postgre website for installation instructions.
IMPORTANT: Ensure that the Postgres user has the following permissions: read, write, create/delete/modify tables/schema/functions/sequences/triggers/views
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.
Example: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.
- Open file C:\Program Files\PostgreSQL\9.5\data\postgresql.conf. Append the following line:
Example:listen_addresses = '*'
Redis
Download Redis 2.8.19
Download Redis 2.8.19 (minimum version supported) from this link.
Extract Redis
- After downloading the package, extract it to a folder on your machine.
Example: C:\redis-2.8.19 - Create a directory for Redis' heap.
Example: "D:\Redis Heap"
Configure Redis
- 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:maxheap 4GB
- # heapdir
- Remove the # and specify your directory path.
- The directory's free space should be larger than (RAM + 2*maxheap).
Example:heapdir "D:\Redis Heap"
- # maxheap
Install Redis
- Open your console as an Administrator.
- Change the current path to:
C:\redis-2.8.19. - Execute the following command:
C:\redis-2.8.19>redis-server --service-install redis.windows.conf --loglevel verbose
- Start the service:
C:\redis-2.8.19>redis-server --service-start
Important:
- 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.
RabbitMQ 3.5.4
Install Erlang
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.
Configure RabbitMQ
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 hostname 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.
MongoDB 3.4
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.
Configure MongoDB
MongoDB requires a data directory to store all data.
- Create the data directory folder by running the following command in a Command Prompt:
md [PATH\TO\DB\FOLDER]
Example:md C:\data\db
- Start MongoDB as an Administrator with the following command:
mongod --dbpath [PATH\TO\DB\FOLDER] --replSet "rs0"
Note: if your path includes spaces, enclose the entire path with double quotes.
Example: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:
mongo
rs.initiate()
rs.status()
use admin
db.createUser ({
user: "[USER_NAME]",
pwd: "[PASSWORD]",
roles: ["root"]
})Example:
mongo
rs.initiate()
rs.status()
use admin
db.createUser ({
user: "tdm",
pwd: "password",
roles: ["root"]
}) - 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:
md [PATH\TO\LOG\FOLDER]
Example:md C:\data\log
- 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
Example:
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:
"C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe" --replSet "rs0" --dbpath "C:\data\db" --logpath "C:\data\logs\mongod.log" --install --serviceName "MongoDB"
Example if using a config:"C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe" --config "C:\Program Files\MongoDB\Server\3.4\mongod.cfg" --install
- Start the MongoDB service by running the following command as an Administrator:
net start MongoDB
- Notes:
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.