How to Install TestLink on CentOS 7
2017-07-24 14:36
597 查看
TestLink is an open-source web based test management execution system. It enables quality assurance teams to create and manage their test cases as well as to organize them into test plans. These test plans allow team members to execute test cases and track
test results dynamically.
In this tutorial, we will be installing TestLink version
at the time this article was written) on CentOS 7.
A CentOS 7 x64 server instance.
A sudo user.
I'll reference the main IP of my CentOS 7 server as
Log in to your server via SSH using the sudo user to install
system, and restart to apply the updates.
It is recommended to remove/disable the Apache default welcome page in production environments.
Prevent Apache from listing web directory files to visitors:
Start the Apache service and enable it to auto-start on boot
As required by TestLink 1.9.16, you need to install MariaDB 10.1 or later on your system.
Answer questions on the screen as instructed below, and remember to use your own MariaDB root password:
Enter current password for root (enter for none): Just press the
Set root password? [Y/n]:
New password:
Re-enter new password:
Remove anonymous users? [Y/n]:
Disallow root login remotely? [Y/n]:
Remove test database and access to it? [Y/n]:
Reload privilege tables now? [Y/n]:
Log into the MySQL shell as
Type the MariaDB root password you set earlier and then press
In the MySQL shell, create a database
and the database user's password
Note: For security purposes, remember to replace the sample password
your own password.
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:
We will need to modify PHP settings to meet TestLink’s requirements as follows:
Use the
Find the following lines:
Replace them with:
Save and quit:
When you visit
the TestLink installation wizard.
On the first page, Click the
On the
On the
all requirements (excluding requirements on
are satisfied, and then click the
On the
and then click the
Database Type:
Database host:
Database name:
Table prefix:
Database admin login:
Database admin password:
TestLink DB login:
TestLink DB password:
You can point your web browser to
and you need to use the default credentials below to log in:
Login Name:
Password:
Note: Remember to change your password after logging in.
For security purposes, you should restrict the
the installation:
Additionally, you should remove the
That's it. Thanks for reading.
test results dynamically.
In this tutorial, we will be installing TestLink version
1.9.16(the latest version
at the time this article was written) on CentOS 7.
Prerequisites
A CentOS 7 x64 server instance.A sudo user.
I'll reference the main IP of my CentOS 7 server as
203.0.113.1.
Step 1: Update the system
Log in to your server via SSH using the sudo user to install epel, update the
system, and restart to apply the updates.
sudo yum install epel-release -y sudo yum update -y && sudo shutdown -r now
Step 2: 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
Step 3: Install database software—MariaDB 10.1
As required by TestLink 1.9.16, you need to install MariaDB 10.1 or later on your system.
3.1 Create the MariaDB 10.1 YUM repo file
cat <<EOF | sudo tee -a /etc/yum.repos.d/MariaDB.repo # MariaDB 10.1 CentOS repository list - created 2017-01-14 03:11 UTC # http://downloads.mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.1/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 EOF
3.2 Install MariaDB 10.1 using YUM
sudo yum install MariaDB-server MariaDB-client -y
3.3 Start the MariaDB service and set it as running at system startup
sudo systemctl start mariadb.service sudo systemctl enable mariadb.service
3.4 Secure the MariaDB installation
sudo /usr/bin/mysql_secure_installation
Answer questions on the screen as instructed below, and remember to use your own MariaDB root password:
Enter current password for root (enter for none): Just press the
Enterbutton
Set root password? [Y/n]:
Y
New password:
your-root-password
Re-enter new password:
your-root-password
Remove anonymous users? [Y/n]:
Y
Disallow root login remotely? [Y/n]:
Y
Remove test database and access to it? [Y/n]:
Y
Reload privilege tables now? [Y/n]:
Y
3.5 Create a MariaDB database for TestLink
Log into the MySQL shell as root:
mysql -u root -p
Type the MariaDB root password you set earlier and then press
Enter.
In the MySQL shell, create a database
testlink, a database user
testlinkuser,
and the database user's password
yourpasswordas follows.
Note: For security purposes, remember to replace the sample password
yourpasswordwith
your own password.
CREATE DATABASE testlink; CREATE USER 'testlinkuser'@'localhost' IDENTIFIED BY 'yourpassword'; GRANT ALL PRIVILEGES ON testlink.* TO 'testlinkuser'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION; FLUSH PRIVILEGES; EXIT;
Step 4: 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
Step 5: Install TestLink 1.9.16
5.1 Download the TestLink 1.9.16 archive from the official TestLink GitHub repo, and then unzip the archive to the /var/www/html
directory:
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
5.2 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
5.3 Modify the custom TestLink configuration file:
Use the vitext editor to open this configuration file:
sudo vi /var/www/html/testlink-code-1.9.16/custom_config.inc.php
Find the following 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:
$tlCfg->log_path = '/var/www/html/testlink-code-1.9.16/logs/'; $g_repositoryPath = '/var/www/html/testlink-code-1.9.16/upload_area/';
Save and quit:
:wq!
5.4 Create a 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
5.5 Restart Apache in order to apply all above settings:
sudo systemctl restart httpd.service
5.6 Modify firewall rules in order to allow web access:
sudo firewall-cmd --zone=public --permanent --add-service=http sudo firewall-cmd --reload
5.7 Finishing the installation
When you visit http://203.0.113.1for the first time, you will be presented with
the TestLink installation wizard.
On the first page, Click the
New installationlink.
On the
Acceptance of Licensepage, check
I agree to the terms set out in this license., and then click the
Continuebutton.
On the
Verification of System and configuration requirementspage, make sure that
all requirements (excluding requirements on
Postgresand
MSSQL)
are satisfied, and then click the
Continuebutton.
On the
Database Configurationpage, provide database configuration info as follows,
and then click the
Process TestLink Setupbutton to finish the installation:
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
You can point your web browser to
http://203.0.113.1to start using TestLink,
and you need to use the default credentials below to log in:
Login Name:
admin
Password:
admin
Note: Remember to change your password after logging in.
5.8 Security measures after the installation:
For security purposes, you should restrict the apacheuser's permissions after
the installation:
sudo chown -R root:root /var/www/html/testlink-code-1.9.16
sudo chown -R apache:apache /var/www/html/testlink-code-1.9.16/{gui,logs,upload_area}
sudo systemctl restart httpd.service
Additionally, you should remove the
/var/www/html/testlink-code-1.9.16/installdirectory:
sudo rm -rf /var/www/html/testlink-code-1.9.16/install
That's it. Thanks for reading.
相关文章推荐
- How To Install Speedtest-cli On a CentOS / RHEL / Scientific / Fedora Linux To Check Internet Speed
- How To Install MySQL on CentOS 7
- How to Install Linux, Apache, MySQL, PHP (LAMP) stack on CentOS 6 【Reliable】
- How to Install OSSEC on Red Hat or CentOS 6
- How to install Python 2.7.3 on CentOS 6.2
- how to install ntopng on centos
- How to install and configure NGINX on CentOS 7
- How To Install Linux, nginx, MySQL, PHP (LEMP) stack on CentOS 6
- [转]How to install PHP 5.3 on CentOS
- how-to-install-grafana-on-centos6.6-x86_64
- How to Install PostgreSQL 9.5 on CentOS/RHEL 7/6/5 and Fedora 23/22
- How to install MySQL Server 5.6 on CentOS 7 / RHEL 7
- How to Install LAMP (Apache 2.4, MySQL 5.6, and PHP 5.4) on CentOS/RHEL 7
- How to install GSL on linux(ubuntu,centos,redhat)
- How to Install Python 2.7 on CentOS6.5
- How to Install PHP 7 on CentOS/RHEL 7.1 & 6.7
- How to Install WineHQ 1.5.27 on Fedora, CentOS and RHEL Linux Distributions
- How to install redis server on CentOS 7 / RHEL 7
- How to install Hadoop 2.7.3 cluster on CentOS 7.3
- HowTo install Redmine on CentOS (Detailed)