Friday, 12 July 2019

Testlink - Installation on AWS CentOS

Installation Steps

  • Update the system :-
            $  sudo yum install epel-release -y
      $ sudo yum update -y && sudo shutdown -r now
     After install epel , restart the system to apply the updates.
  • Install a Web Server -Apache :-
             $  sudo yum install httpd -y
       It is recommended to remove/disable the Apache default welcome page in production environments.
       sudo sed -i 's/^/#&/g' /etc/httpd/conf.d/welcome.conf
       Prevent Apache from listing web directory files to visitors:
       sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/httpd/conf/httpd.conf
       Start the Apache service and enable it to auto-start on boot
       $  sudo systemctl start httpd.service
       $  sudo systemctl enable httpd.service
  • Install Mysql Database :-
        refer Mysql Installation
  • Install PHP 7.1 and Some extensions :-
      TestLink requires PHP 5.5 or later. In order to get better performance, we will install PHP 7.1 and all the necessary extension for TestLink as follows,
      sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
      $ sudo yum install mod_php71w php71w-mysqlnd php71w-common php71w-gd php71w-ldap php71w-cli php71w-mcrypt php71w-xml -y
      We will need to modify PHP settings to meet TestLink’s requirements as follows:
      sudo cp /etc/php.ini /etc/php.ini.bak
      $ sudo sed -i "s/session.gc_maxlifetime = 1440/session.gc_maxlifetime = 2880/" /etc/php.ini
      $ sudo sed -i "s/max_execution_time = 30/max_execution_time = 120/" /etc/php.ini
  • Install Testlink 1.9.16 :-
       Download the testlink and unzip into /var/www/html folder.
       $ sudo cd wget https://github.com/TestLinkOpenSourceTRMS/testlink-code/archive/1.9.16.tar.gz
       $ sudo tar -zxvf 1.9.16.tar.gz -C /var/www/html
       $ sudo chown -R apache:apache /var/www/html/testlink-code-1.9.16
       Create a custom configuration file for Testlink 
       sudo cp /var/www/html/testlink-code-1.9.16/custom_config.inc.php.example /var/www/html/testlink-code-1.9.16/custom_config.inc.php
       Modify the custom Testlink configuration file 
       sudo vi /var/www/html/testlink-code-1.9.16/custom_config.inc.php
       Find the below lines
       // $tlCfg->log_path = '/var/testlink-ga-testlink-code/logs/'; /* unix example */
       // $g_repositoryPath = '/var/testlink-ga-testlink-code/upload_area/'; /* unix example */
       Replace them with below lines
       $tlCfg->log_path = '/var/www/html/testlink-code-1.9.16/logs/';
       $g_repositoryPath = '/var/www/html/testlink-code-1.9.16/upload_area/';
       Create virtual Host for Testlink       
           
cat <<EOF | sudo tee -a /etc/httpd/conf.d/testlink.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/testlink-code-1.9.16/
ServerName testlink.example.com
ServerAlias www.testlink.example.com
<Directory /var/www/html/testlink-code-1.9.16/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/testlink.example.com-error_log
CustomLog /var/log/httpd/testlink.example.com-access_log common
</VirtualHost>
EOF
                                                   

  • Restart Apache in order to apply all above settings :-
           sudo systemctl restart httpd.service
  • Finishing the installation :-
      When you visit http://xx.xxx.xxx.xx:80 
            you will get New Installation wizard, there you can do database setup by providing below details             
  • Database Type: MySQL/MariaDB (5.6+ / 10.+)
  • Database host: localhost
  • Database name: testlink
  • Table prefix: <LEAVE IT EMPTY>
  • Database admin login: root
  • Database admin password: <your-MariaDB-root-password>
  • TestLink DB login: testlinkuser
  • TestLink DB password: yourpassword
           Once these setup done, you can login with username & password.

No comments:

Post a Comment