How to install TestLink on CentOS 6.3

Few days ago, QA guys asked me to install a tool that will make their work easier. This tool, Testlink, is an open-source management tool which includes test specification, planning, reporting, requirements tracking and collaborate with well-known bug trackers.

Below I will show you step-by-step how to install TestLink on CentOS 6.3, including the troubleshooting steps for most commonly faced issues.

1. Download Testlink. Check if a new version than I used bellow is available (
[codesyntax lang="bash"]

mkdir work
cd work
wget -c
tar xfz testlink-1.9.5.tar.gz
mv testlink-1.9.5/* testlink-1.9.5/.[^.]* /var/www/html/
rm -fr ~/work/testlink-1.9.5
chown -R apache:apache /var/www/html/*


2. Install required packages
[codesyntax lang="bash"]

yum install mysql-server php php-mysql php-gd


Note: if you want authentication against ldap you will have to also install php-ldap package

3. Optimize php configuration for TestLink.
[codesyntax lang="bash"]

vim /etc/php.ini
:%s/max_execution_time = 30/max_execution_time = 120/g
:%s/session.gc_maxlifetime = 1400/session.gc_maxlifetime = 2400/g


4. Set apache and mysql services to start at boot
[codesyntax lang="bash"]

chkconfig httpd on
chkconfig mysqld on


5. Start apache and mysql services

[codesyntax lang="bash"]

service httpd start
service mysqld start


6. Set mysql root password

[codesyntax lang="bash"]

mysqladmin -u root password YOURPASSWORD


7. Open 80/tcp port in firewall. Add the following rule to /etc/sysconfig/iptables
[codesyntax lang="bash"]

vim /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
[codesyntax lang="bash"]



My /etc/sysconfig/iptables on TestLink machine is:
[codesyntax lang="bash"]

cat /etc/sysconfig/iptables


# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited

If you don't want to have firewall on TestLink machine you can disable it
[codesyntax lang="bash"]

chkconfig iptables off
service iptables stop


8. Restart firewall in order to apply the new rule
[codesyntax lang="bash"]

service iptables restart


9. Create directories used by TestLink for logs and to upload files
[codesyntax lang="bash"]

mkdir -p /var/testlink/logs/
mkdir -p /var/testlink/upload_area/
chown apache:apache -R /var/testlink/


11. Assuming all steps were carried out on a machine called then open a browser and navigate to TestLink page and setup first configuration.

Note: if you don't have a working DNS or this machine doesn't have a proper record in DNS server then you should navigate by the machine's IP: http://x.x.x.x/

12. Click "New installation"

13. Check I agree to the terms set out in this license and click Continue

14. A new checking report will be displayed. In this report shouldn't be fatal errors (maybe some warnings at most). If so, press Continue

15. Fill database access form and press Process TestLink Setup! button

Database host: localhost
Database name: testlink
Database admin login: root
Database admin password: YOURPASSWORD TestLink DB login: testlink

16. Remove Install directory
[codesyntax lang="bash"]

rm -fr /var/www/html/install/


17. Modify the email settings
[codesyntax lang="bash"]

vim /var/www/html/


19. Set an alias for root, so all emails to root to go the new alias - this step is optional
[codesyntax lang="bash"]

vim /etc/aliases


[codesyntax lang="bash"]



Note: In my case I have postfix configured as smarthost, so I going to use localhost as email server. I am not going to cover postfix configuration here.

20. Login into application using default credentials (user: admin / password: admin)

21. Change admin default password

22. If TestLink mailing functionality is not working and you see in logs some error like bellow it's very likely that selinux is the issue there. One possible approach is to disable it

[>>][510fe10b8186e953397877][DEFAULT][/lostPassword.php][13/Feb/4 16:25:47]
        [13/Feb/4 16:25:47][WARNING][<nosession>][GUI]
fsockopen(): unable to connect to (Permission denied) - in /var/www/html/third_party/phpmailer/class.smtp.php - Line 132
        [13/Feb/4 16:25:47][WARNING][<nosession>][GUI]
Undefined variable: note - in /var/www/html/lostPassword.php - Line 49

[codesyntax lang="bash"]

vim /etc/sysconfig/selinux


[codesyntax lang="bash"]




  1. hi,
    i am installing testlink on ip was 19x.x.x.9 and mysql and php are installed in server x.x.x.6.
    i got error in installation process 4th step mysql database creation failed. help me

    • Hi Venky,

      You should use -h switch to mysqladmin command:
      mysqladmin -h x.x.x.6 -u root password YOURPASSWORD

      Please let me know if this hint helped you.

  2. Raju Parsha

    i am installing in Mac but showing error while creating mysql database and all apache,mysql are installed in same machine. please help me.

  3. Under the Web and PHP configuration, I am getting an error..!! Checking MSSQL Database Failed! MSSQL Database cannot be used.

  4. To use Testlink APIs, the package php-xmlrpc should be installed. Good to cross check that.
    for centos:
    yum -y install php-xmlrpc

Scrie si tu o vorbulita

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.