Difference between revisions of "Testlink"

From Wiki at Neela Nurseries
Jump to: navigation, search
m
m (^ References to Testlink)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
 +
 +
<center>
 +
Testlink Notes</br >
 +
2019-04-10 Wednesday
 +
</center>
 +
 +
 +
 +
== [[#top|^]] Overview ==
 +
 +
This wiki article holds notes on Testlink 1.9.12 installation and configuration, motivated by need to restore an off-lined installation of Testlink along with its contact files found in the originally configured upload_area . . .
 +
 +
 +
<!-- comment -->
 +
 +
== [[#top|^]] References to Testlink ==
 +
 +
We started this effort back in 2018 Q3 . . .
  
 
2018-09-06
 
2018-09-06
 
+
<ul>
 
*  http://testlink.sourceforge.net/docs/documents/installation.html
 
*  http://testlink.sourceforge.net/docs/documents/installation.html
  
 
*  https://github.com/TestLinkOpenSourceTRMS/testlink-code/blob/testlink_1_9/docs/testlink_installation_manual.pdf
 
*  https://github.com/TestLinkOpenSourceTRMS/testlink-code/blob/testlink_1_9/docs/testlink_installation_manual.pdf
 +
</ul>
 +
 +
2019-04-25
 +
<ul>
 +
*  http://testlink.sourceforge.net/docs/documents/installation.html#d0e87
 +
 +
*  http://testlink.sourceforge.net/docs/documents/installation.html#configuration
 +
</ul>
 +
  
 
We may need to install PHP 5.6 to get Testlink to work, to talk with MYSQL database server.  Unfortunately both the following articles refer to PPA of Andrej Sury which is not reachable from work site where needed . . .
 
We may need to install PHP 5.6 to get Testlink to work, to talk with MYSQL database server.  Unfortunately both the following articles refer to PPA of Andrej Sury which is not reachable from work site where needed . . .
Line 80: Line 107:
  
 
<!-- comment -->
 
<!-- comment -->
 +
 +
== [[#top|^]] Testlink Config Variables ==
 +
 +
Before running web-based install script must set ($tlCfg->log_path) and ($g_repositoryPath) . . .
 +
 +
    136 - log directory        ($tlCfg->log_path)
 +
    137 - upload directory  ($g_repositoryPath)
 +
 +
 +
<i>Figure x - two Testlink config files contain variable $g_repositoryPath:</i>
 +
 +
<pre>
 +
/mnt/sdb5/usr/local/share/testlink-1.9.12$ grep -nr g_repositoryPath ./*
 +
 +
./config.inc.php:1016:$g_repositoryPath = '/var/testlink/upload_area/';  /* unix example */
 +
./custom_config.inc.php.example:39:// $g_repositoryPath = '/var/testlink-ga-testlink-code/upload_area/';  /* unix example */
 +
./lib/functions/files.inc.php:116: global $g_repositoryPath;
 +
./lib/functions/files.inc.php:118: $dest = $g_repositoryPath.DIRECTORY_SEPARATOR.session_id().".dummy.gz";
 +
./lib/functions/common.php:464:  global $g_repositoryPath;
 +
./lib/functions/common.php:468:    $ret = checkForRepositoryDir($g_repositoryPath);
 +
./README:137:- upload directory  ($g_repositoryPath)
 +
 +
/mnt/sdb5/usr/local/share/testlink-1.9.12$
 +
</pre>
 +
 +
 +
Testlink upload directory and log directory are on the old server set to the same path:
 +
 +
<pre>
 +
/mnt/sdb5/var/testlink$ ls -l
 +
 +
total 8
 +
drwxr-xr-x  2 www-data www-data 4096 Feb 25 11:51 logs
 +
drwxr-xr-x 157 www-data www-data 4096 Oct  3  2013 upload_area
 +
 +
/mnt/sdb5/var/testlink$
 +
</pre>
 +
 +
 +
<!-- comment -->
 +
 +
== [[#top|^]] Restore Testlink database back-up ==
 +
 +
May be able to avoid some of the initial config steps if what we really need is to restore a Testlink database back-up . . . however will this back-up contain paths to files which were stored in a different location in the original Testlink installation?
 +
 +
<ul>
 +
*  http://help.collab.net/index.jsp?topic=/teamforge-testlink-2/action/testlink-restore.html
 +
</ul>
 +
 +
 +
<!-- comment -->
 +
 +
== [[#top|^]] Recommended sticky bit settings - logs and upload_area ==
 +
 +
Sticky bit settings recommended:
 +
 +
<pre>
 +
Read/write permissions
 +
For security reasons we suggest that directories tagged with [S] on following messages, will be made UNREACHEABLE from browser.
 +
Give a look to README file, section 'Installation & SECURITY' to understand how to change the defaults.
 +
Checking if /opt/testlink-1.9.12/gui/templates_c directory exists OK
 +
Checking if /opt/testlink-1.9.12/gui/templates_c directory is writable (by user used to run webserver process) OK
 +
Checking if /var/local/testlink-1p9p12/logs/ directory exists [S] OK
 +
Checking if /var/local/testlink-1p9p12/logs/ directory is writable (by user used to run webserver process) OK
 +
Checking if /var/local/testlink-1p9p12/upload_area/ directory exists [S] OK
 +
Checking if /var/local/testlink-1p9p12/upload_area/ directory is writable (by user used to run webserver process) OK
 +
</pre>
 +
 +
 +
<!-- comment -->
 +
 +
== [[#top|^]] Manual Copy of Logs and Upload Content ==
 +
 +
On new 18.04 LTS host created <code>/var/testlink-1p9p12</code> with <code>ownership www-data:www-data</code>, and created symlink <code>/var/testlink -> /var/testlink-1p9p12</code>.  Invoke `rsync` to copy each group of files over from mounted volume constituting old server file system to new server disk partition at like paths.  Steps in list-wise summary:
 +
 +
<ul>
 +
* &nbsp;<code>$ cd /var</code><br />
 +
* &nbsp;<code>$ sudo mkdir -pv ./logs ./upload_area</code><br />
 +
* &nbsp;<code>$ sudo chown -R www-data:www-data ./*</code><br />
 +
* &nbsp;<code>$ sudo rsync -avzpt /path/to/original/testlink/logfiles/* ./logs</code><br />
 +
* &nbsp;<code>$ sudo rsync -avzpt /path/to/original/testlink/uploaded/files/* ./upload_area</code><br />
 +
</ul>
 +
 +
 +
 +
<!-- comment -->
 +
  
 
<!-- EOF -->
 
<!-- EOF -->

Latest revision as of 11:57, 25 April 2019


Testlink Notes</br > 2019-04-10 Wednesday


^ Overview

This wiki article holds notes on Testlink 1.9.12 installation and configuration, motivated by need to restore an off-lined installation of Testlink along with its contact files found in the originally configured upload_area . . .


^ References to Testlink

We started this effort back in 2018 Q3 . . .

2018-09-06

2019-04-25


We may need to install PHP 5.6 to get Testlink to work, to talk with MYSQL database server. Unfortunately both the following articles refer to PPA of Andrej Sury which is not reachable from work site where needed . . .


2019-04-10 Wednesday

It looks like on a host running Apache2, PHP and MYSQL that Testlink can be set up with a symlink in /var/www pointing to a directory outside Apache's documentRootPath:

user@localhost:/var/www$ ls -l

total 36
lrwxrwxrwx  1 www-data www-data   28 Oct 31  2011 blogs -> /usr/local/share/b2evolution
drwxr-x--- 16 root     www-data 4096 Jan 24  2014 bugzilla
-rw-r--r--  1 root     root      349 Nov 28  2017 BUGZILLA_TODO
drwxr-xr-x  7     1003     1003 4096 Oct  1  2012 documents
lrwxrwxrwx  1 www-data www-data   27 Nov 16  2011 dotproject -> /usr/local/share/dotproject
-rw-r--r--  1 root     root     1941 Oct 28  2015 index.html
-rw-r--r--  1 www-data www-data 1915 Jan 14  2013 index.oldhtml
lrwxrwxrwx  1 root     root       32 Oct 18  2012 mantis -> /usr/local/share/mantisbt-1.2.11
lrwxrwxrwx  1 root     root       29 Jan  4  2013 math -> /usr/local/share/MathJax-v2.1
-rw-r--r--  1 www-data www-data   17 May 13  2011 phpinfo.php
lrwxrwxrwx  1 root     root       32 Nov 13  2014 testlink -> /usr/local/share/testlink-1.9.12
lrwxrwxrwx  1 root     root       32 Nov 13  2014 testlink-new -> /usr/local/share/testlink-1.9.12
lrwxrwxrwx  1 root     root       32 Aug 13  2014 testlink-old -> /usr/local/share/testlink-1.9.11
drwxr-xr-x 19 root     root     4096 Jan 19  2017 wiki

user@localhost:/var/www$


The stuff in /usr/local/share has these permissions:

user@localhost:/usr/local/share$ ls -l

total 76
drwxr-xr-x 14 root     www-data  4096 Feb 24  2012 b2evolution
drwxrwsr-x  2 root     staff     4096 May  9  2011 ca-certificates
drwxr-xr-x 14 root     www-data  4096 Nov 16  2011 dotproject
drwxrwsr-x  2 root     staff     4096 May  9  2011 fonts
drwxr-xr-x  2 root     root      4096 Sep 26  2013 hide
drwxr-xr-x 11 www-data www-data  4096 Oct 22  2013 kcfinder-2.51
drwxr-xr-x  2 root     root      4096 May  9  2011 man
drwxr-xr-x 16 root     www-data 12288 Oct 31  2012 mantisbt-1.2.11
drwxr-xr-x  9 root     www-data  4096 Feb 23  2012 MathJax-v1.1a
drwxr-xr-x 10     1002     1002  4096 Jan  4  2013 MathJax-v2.1
drwxrwsr-x  7 root     staff     4096 May  9  2011 sgml
drwxr-xr-x 10 www-data www-data  4096 Aug 14  2014 testlink-1.9.11
drwxr-xr-x 10 www-data www-data  4096 Jun 22  2017 testlink-1.9.12
drwxr-xr-x  9 www-data www-data  4096 May 30  2014 testlink-1.9.8
drwxr-xr-x  4 www-data www-data  4096 Aug 13  2014 testlink_custom
drwxrwsr-x  2 root     staff     4096 Sep 21  2012 texmf
drwxrwsr-x  6 root     staff     4096 May  9  2011 xml

user@localhost:/usr/local/share$


Search for PHP's error log file path and name:

$ for file in `locate php.ini | grep etc | grep 7.0`; do grep -n error_log $file; done



^ Testlink Config Variables

Before running web-based install script must set ($tlCfg->log_path) and ($g_repositoryPath) . . .

   136 - log directory         ($tlCfg->log_path)
   137 - upload directory  ($g_repositoryPath)


Figure x - two Testlink config files contain variable $g_repositoryPath:

/mnt/sdb5/usr/local/share/testlink-1.9.12$ grep -nr g_repositoryPath ./*

./config.inc.php:1016:$g_repositoryPath = '/var/testlink/upload_area/';  /* unix example */
./custom_config.inc.php.example:39:// $g_repositoryPath = '/var/testlink-ga-testlink-code/upload_area/';  /* unix example */
./lib/functions/files.inc.php:116:	global $g_repositoryPath;
./lib/functions/files.inc.php:118:	$dest = $g_repositoryPath.DIRECTORY_SEPARATOR.session_id().".dummy.gz";
./lib/functions/common.php:464:  global $g_repositoryPath;
./lib/functions/common.php:468:    $ret = checkForRepositoryDir($g_repositoryPath);
./README:137:- upload directory  ($g_repositoryPath)

/mnt/sdb5/usr/local/share/testlink-1.9.12$


Testlink upload directory and log directory are on the old server set to the same path:

/mnt/sdb5/var/testlink$ ls -l

total 8
drwxr-xr-x   2 www-data www-data 4096 Feb 25 11:51 logs
drwxr-xr-x 157 www-data www-data 4096 Oct  3  2013 upload_area

/mnt/sdb5/var/testlink$


^ Restore Testlink database back-up

May be able to avoid some of the initial config steps if what we really need is to restore a Testlink database back-up . . . however will this back-up contain paths to files which were stored in a different location in the original Testlink installation?


^ Recommended sticky bit settings - logs and upload_area

Sticky bit settings recommended:

Read/write permissions
For security reasons we suggest that directories tagged with [S] on following messages, will be made UNREACHEABLE from browser.
Give a look to README file, section 'Installation & SECURITY' to understand how to change the defaults.
Checking if /opt/testlink-1.9.12/gui/templates_c directory exists 	OK
Checking if /opt/testlink-1.9.12/gui/templates_c directory is writable (by user used to run webserver process) 	OK
Checking if /var/local/testlink-1p9p12/logs/ directory exists [S] 	OK
Checking if /var/local/testlink-1p9p12/logs/ directory is writable (by user used to run webserver process) 	OK
Checking if /var/local/testlink-1p9p12/upload_area/ directory exists [S] 	OK
Checking if /var/local/testlink-1p9p12/upload_area/ directory is writable (by user used to run webserver process) 	OK


^ Manual Copy of Logs and Upload Content

On new 18.04 LTS host created /var/testlink-1p9p12 with ownership www-data:www-data, and created symlink /var/testlink -> /var/testlink-1p9p12. Invoke `rsync` to copy each group of files over from mounted volume constituting old server file system to new server disk partition at like paths. Steps in list-wise summary:

    •  $ cd /var
    •  $ sudo mkdir -pv ./logs ./upload_area
    •  $ sudo chown -R www-data:www-data ./*
    •  $ sudo rsync -avzpt /path/to/original/testlink/logfiles/* ./logs
    •  $ sudo rsync -avzpt /path/to/original/testlink/uploaded/files/* ./upload_area