How to Install TestLink on Ubuntu, Debian and Linux Mint - Cloud Network

Networking | Support | Tricks | Troubleshoot | Tips

Buymecoffe

Buy Me A Coffee

Thursday, October 24, 2019

How to Install TestLink on Ubuntu, Debian and Linux Mint

 





sudo apt-get install apache2
sudo apt-get install mysql-server mysql-client

sudo nano /etc/mysql/my.cnf
sudo apt-get install phpmyadmin

Packages
sudo apt-get install php5-mysql php5-pgsql php5-gd php5-ldap php-pear

sudo gedit /etc/php5/apache2/php.ini
max_execution_time = 120 or 120
session.gc_maxlifetime = 2700 or 2400

sudo gedit /var/www/html/test.php
 <?php phpinfo();>

Restart the apache server
sudo service apache2 restart   or sudo /etc/init.d/apache2 restart
sudo service mysql restar      or sudo /etc/init.d/mysql restart


cd /var/www/

Downloading
sudo wget https://sourceforge.net/projects/testlink/files/TestLink%201.9/TestLink%201.9.14/testlink-1.9.14.tar.gz
or http://sourceforge.net/projects/testlink/

Untar
tar zxvf <testlink-1.9.14.tar.gz>

Move
mv testlink-1.9.14 testlink

Permission
chmod -R 755 testlink
chown -R apache:apache testlink
chmod -R 777 gui/templates_c
chmod 777 logs
chmod 777 upload_area

sudo nano config.inc.php 
change to
$g_repositoryPath = '/var/www/html/testlink/upload_area';
$tlCfg->log_path = '/var/www/html/testlink/logs';
$tlCfg->config_check_warning_mode = 'SILENT';

sudo touch config_db.inc.php
sudo nano config_db.inc.php
<?php
// Automatically Generated by TestLink Installer - Mon, 04 Apr 16 10:58:07 +0530
define('DB_TYPE', 'mysql');
define('DB_USER', 'testlink');
define('DB_PASS', '123');
define('DB_HOST', 'localhost');
define('DB_NAME', 'testlink');
define('DB_TABLE_PREFIX', '');

Automatic Installation
http://192.168.1.182/testlink_web_dir/install/index.php
http://192.168.1.182/testlink
http://192.168.1.182/index.php

Manual Installation

mysql -u root -p
CREATE DATABASE testlink CHARACTER SET utf8 COLLATE utf8_general_ci
E.g. # mysql -u testlink -ppass testlink < /var/www/testlink/install/sql/testlink_create_tables.sql

GRANT ALL PRIVILEGES ON testlink.* TO 'localhost'@'%' WITH GRANT OPTION;
grant all privileges on testlink.* to root@'%' identified by '123';

Database back-up
#!/bin/sh
# Script for backup TestLink service
# create filenames
mydate=`date +%y%m%d`
backup_folder="/home/gat/backup"
upload_folder="/home/gat/web/testlink/upload_area/"
filename1="$backup_folder/testlink_db_$mydate.bck.sql"
filename2="$backup_folder/testlink_upload_$mydate.bck.tgz"
# dump data
mysqldump -uroot -pyour_password testlink_17 > $filename1
# compress
gzip -f9 $filename1
# backup attachments
tar -cvzf $filename2 $upload_folder
# save to backuped area on server titan
# mount titan:/export/gat /home/gat/backup/titan/ -o
soft,nosuid,rw,noauto,user,noexec
#cp $filename.gz /home/gat/backup/titan/

create a file
cd /var/www/testlink
touch config_db.inc.php

change a configuration file
sudo gedit /var/www/testlink/config.inc.php
$tlCfg->config_check_warning_mode = 'SILENT'
$tlCfg->api->enabled = TRUE;
$tlCfg->exec_cfg->enable_test_automation = ENABLED;

localhost/testlink
login with the username: admin and password: admin

Remove Install directory
sudo rm -rf /var/www/testlink/install/

Modify email settings
sudo cp custom_config.inc.php.example  custom_config.inc.php

Uncomment four variables
$g_smtp_host = '10.201.1.123'; # SMTP server MUST BE configured
$g_tl_admin_email = 'tl_admin@testlink'; # for problem/error notification
$g_from_email = 'testlink@testlink'; # email sender
$g_return_path_email = 'francisco@testlink';

-------------------------------------------------------------
/var/www/html/index.html
/var/www/testlink/config_db.inc.php
/var/www/testlink/custom_config.inc.php.example
/var/www/testlink/config.inc.php