Cassandra NoSQL Database Installation (Unix / Linux) - version

Below you will find the process for installing a Cassandra NoSQL database for TestRail Server installations on Unix or Linux servers that use TestRail 7.4 or later.


In order to install the Cassandra database, you have to install some required components:

  1. Open JDK 8
  2. C++ driver
  3. Cassandra driver for TestRail installation operating system

The following steps are an example of an Ubuntu 20.04 installation:

1. Install JDK 8

Install Java version 8 using the following command:

$ apt-get install openjdk-8-jdk -y


If you are installing on a RedHat-based distribution, the package is called java-1.8.0-openjdk

Once the installation is completed, verify the installed version of Java with the following command:

$ java -version

The JDK is successfully installed if java -version outputs something like this:

Openjdk version “1.8.0_312”
OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07)
OpenJDK 64-bit Server VM (build 25.312-b07, mixed mode)

2. Install C++ driver

C++ driver is needed for Linux TestRail platforms since the Cassandra driver won’t run without it.

Ubuntu Distribution

Download the multiarch-support package:

$ wget

Install the package.

$ dpkg -i multiarch-support_2.27-3ubuntu1.6_amd64.deb

Now download the C++ driver.

$ wget

Run this command to install it.

$ dpkg -i cassandra-cpp-driver_2.16.0-1_amd64.deb

RedHat-based Distribution

Download the multiarch-support package.

$ wget

Install the package.

$ rpm -i libuv-1.35.0-1.el7.x86_64.rpm

Now download the C++ driver.

$ wget

Run this command to install it.

$ rpm -i cassandra-cpp-driver-2.16.0-1.el7.x86_64.rpm

3. Cassandra driver for TestRail

Download the driver for Linux from

Make sure the file is in the php extension directory. You can find the location of the 'extension_dir' folder by entering the following command.

$ php -i | grep ^extension_dir

Copy the file to the extension_dir folder.

$ cp /usr/lib/php/20210902/

Using an MD5 tool such as md5sum, verify that the MD5 checksum of this file is:


It should return something similar to this:

$ /usr/lib/php/20210902# md5sum

Enable the extension inside the php.ini by adding the following line to the file.


You can confirm the extension is available by writing the following command.

$ php -m

Here is a typical phpinfo page that lists all the required php extensions including cassandra.

If cassandra does not load correctly, you can verify that the driver has all of its dependencies available by running the following command from the extension directory, or use the full path of '' file.


Here is an example of a correct output: (0x00007ffe7fdf8000) => /lib/x86_64-linux-gnu/ (0x00007f037a800000) => /lib/x86_64-linux-gnu/ (0x00007f037ad2e000) => /lib/x86_64-linux-gnu/ (0x00007f037acfc000) => /lib/x86_64-linux-gnu/ (0x00007f037a77e000) => /lib/x86_64-linux-gnu/ (0x00007f037a556000) => /lib/x86_64-linux-gnu/ (0x00007f037a200000) => /lib/x86_64-linux-gnu/ (0x00007f0379c00000) => /lib/x86_64-linux-gnu/ (0x00007f037acde000) => /lib/x86_64-linux-gnu/ (0x00007f03799d6000) => /lib/x86_64-linux-gnu/ (0x00007f037acbe000) => /lib/x86_64-linux-gnu/ (0x00007f037acb9000)
/lib64/ (0x00007f037ae9a000) => /lib/x86_64-linux-gnu/ (0x00007f037acb2000)

In case the C++ Driver is missing, you will get an incorrect output. For example: (0x00007ffcc7ffd000) => not found => /lib/x86_64-linux-gnu/ (0x00007f0574a3e000) => /lib/x86_64-linux-gnu/ (0x00007f0574a0c000) => /lib/x86_64-linux-gnu/ (0x00007f057498a000) => /lib/x86_64-linux-gnu/ (0x00007f0574762000)
/lib64/ (0x00007f0574ba9000)

Install Apache Cassandra

The following steps are an example of an Ubuntu 22.04 installation, if you are installing on a RedHat-based distribution, follow the instructions in DataStax Documentation.


Currently, Cassandra 3.11 is the ONLY supported Cassandra version for Server installations.

Install the required dependencies with the following command:

$ apt-get install apt-transport-https gnupg2 -y

Download and add the GPG key with the following command:

$ curl -fsSL | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/cassandra.gpg > /dev/null

Wait for the OK response, it may take a few seconds. Next, add the Cassandra repository to the APT with the following command:

$ sh -c 'echo "deb 311x main" > /etc/apt/sources.list.d/cassandra.list'

Update the repository cache:

$ apt-get update -y

Install Apache Cassandra.

$ apt-get install cassandra -y

Make sure you have a cassandra-lucene-index-plugin-*.jar installed in your Cassandra Home lib directory. (Usually the path is /usr/share/cassandra/lib). This .jar file should have the version number of your Cassandra installation.

If you don’t, you can download the .jar file from the official maven repository.

$ wget

Copy the file to the Home lib directory.

$ cp cassandra-lucene-index-plugin- /usr/share/cassandra/lib

Restart Cassandra.

$ service cassandra restart

Now you are ready to connect to Cassandra for the first time. Type:


Or, if the previous command does not work for you, you can type: 

cqlsh -u cassandra -p cassandra

You should get the following output:

Connected to Test Cluster at
[cqlsh 5.0.1 | Cassandra 3.11.11 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.

To install TestRail, it is necessary to create a Cassandra keyspace. Create one running the following CQL query:

CREATE KEYSPACE IF NOT EXISTS testrail WITH REPLICATION={'class': 'SimpleStrategy', 'replication_factor': 1};

This installation of Cassandra uses ‘cassandra’ as user and ‘cassandra’ as password. If you want to create a new user, you must edit the cassandra.yaml file on your terminal:

Edit the file by making changes to the authenticator and authorizer directives. Comment the line “authenticator: AllowAllAuthenticator” and add the following line, so it looks like this:

#authenticator: AllowAllAuthenticator
authenticator: org.apache.cassandra.auth.PasswordAuthenticator

Next comment on the line authorizer: “AllowAllAuthorizer” and add the following line so it looks like this:

#authorizer: AllowAllAuthorizer
authorizer: org.apache.cassandra.auth.CassandraAuthorizer

Then, restart Cassandra.

$ service cassandra restart

Connect to Cassandra using the default user and password.

$ cqlsh -u cassandra -p cassandra

Then, create a Cassandra TestRail user and password.

cassandra@cqlsh> create user 'username' with password 'password';

Grant all privileges to the TestRail user.

cassandra@cqlsh> GRANT ALL ON KEYSPACE testrail to 'testrail';

You can then exit Cassandra.

Was this article helpful?
0 out of 0 found this helpful