How to install the TestLink 1.9.20 on Ubuntu 22.04
Today I’m doing my first installation of the Testlink, after had completed the installation I can say, this is not an easy task for the first time. Missing details about the steps and you need to join the information from many places before you have a complete step-by-step to follow the installation.
What we will install to run the TestLink?
- The apache webserver;
- The PHP version 7.x.y;
- The MySQL database (Or MariaDB).
Let's start by doing the apache installation, open a terminal and type:
$ sudo apt-get install apache2
I did a video showing this step by step.
Next, we will need to install the PHP 8.2, again using a terminal you can type:
$ sudo apt-get install php8.2 php8.2-mysql php8.2-gd php8.2-ldap php8.2-json php8.2-curl php8.2-mbstring
You can also check out here a video explaining the installation.
The last software is the database, to install the MySQL we need to type the command:
$ sudo apt-get install mariadb-server
$ sudo mysql_secure_installation
You can check out this installation here in my YouTube Channel.
After completed the installations you will download the TestLink here. Move the downloaded file to folder /var/www/html.
$ sudo mv testlink-x.y-z.tar.gz /var/www/html
Move to /var/www/html and unzip the folder.
$ cd /var/www/html
$ tar -zxvf testlink-x.y-z.tar.gz
The next thing is to rename the folder for making easier the navigation, because you will type the folder name in the URL to access the Testlink by the browser.
$ mv testlink-x.y.z testlink
Ok, the next step will be to change the permissions, because the apache needs have access to this folder, sub-folders, and files.
$ chmod 777 /var/www/html/testlink/ -R
The Testlink needs to use more two folders, the upload_area and logs. Now we will move to folder /var/ and create the directory testlink there.
$ cd /var
$ sudo mkdir testlink
$ sudo mkdir testlink/logs
$ sudo mkdir testlink/upload_area
Again, change the permissions, because the apache will have access to these folders.
$ sudo chmod 777 /var/testlink/ -R
Now, is time for us access the MySQL and to create a database for the TestLink.
$ mysql -uroot -pyourpassword
After you had accessed the MySQL(Or MariaDB) you will create the database.
> CREATE DATABASE testlink;
> quit
Now the database for Testlink has been created, is time for us make other configuration, we will move to folder /var/www/html/testlink.
$ cd /var/www/html/testlink
$ sudo nano config_db.inc.php
Inside this file you will put the following code:
<?php // Automatically Generated by TestLink Installer
define(‘DB_TYPE’, ‘mysql’);
define(‘DB_USER’, ‘testlinker’);
define(‘DB_PASS’, ‘testlink_pass’);
define(‘DB_HOST’, ‘localhost’);
define(‘DB_NAME’, ‘tl_master’);
?>
Remember, you need replace it with your correct configurations, and next, just save the file and change the permissions.
$ sudo chmod 777 config_db.inc.php
After all, these things let’s just restart the apache2 service, before trying to access the Testlink.
$ sudo service apache2 restart
Now it’s the hour to see the Testlink is running, open the browser and access http://localhost/testlink/install/index.php, in this page you will follow the automatic installation.
If everything is all right, you will see the TestLink page to complete the installation.
In the previous video, I missed one configuration, here is the video where I comment the solutions, please activate the subtitle, because the video is in portuguese.