Testlink安裝使用

NO IMAGE

Testlink安裝記錄:
Dennis 2012-3-19

系統/軟體環境:
centos 5.5
php 5.2
apache 2.2.3
mysql  
5.1.58

[[email protected] www]# lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description:    CentOS release 5.5 (Final)
Release:        5.5
Codename:       Final
[[email protected] www]# mysql --version
mysql  Ver 14.14 Distrib 5.1.58, for redhat-linux-gnu (i686) using readline 5.1
[[email protected] www]# php --version
PHP 5.2.17 (cli) (built: Aug 31 2011 17:06:47)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
[[email protected] www]# whereis apachectl
apachectl: /usr/sbin/apachectl /usr/share/man/man8/apachectl.8.gz
[[email protected] www]# /usr/sbin/apachectl -v
Server version: Apache/2.2.3
Server built:   Oct 20 2011 17:00:12
[[email protected] www]#

下載:
http://sourceforge.net/projects/testlink/
安裝:(在/var/www/中解壓)

[[email protected] www]tar zxvf testlink-1.9.3.tar.gz
[[email protected] www]mv testlink-1.9.3 testlink

使用myql 建立操作testlink的賬號和密碼:
mysql 建立資料庫testlink使用者名稱密碼

mysql > grant select,insert,update,delete on testlink.* to [email protected] identified by "mypassword"; 

網頁安裝:
http://192.168.1.28/testlink
設定資料庫賬號密碼(賬號root,密碼預設情況為空)
設定操作testlink資料庫的賬號和密碼(賬號為testlink,密碼為mypassword)

安裝錯誤:
TestLink setup will now attempt to setup the database:

Creating connection to Database Server:OK!

Connecting to database `testlink`:OK!
Creating Testlink DB user `testlink`:OK! (ok – user_exists ok – grant assignment) 
Processing:sql/mysql/testlink_create_tables.sql
OK!
Writing configuration file:Failed!

TestLink couldn’t write the config file. Please copy the following into the ../config_db.inc.php file:
<?php
// Automatically Generated by TestLink Installer
define(‘DB_TYPE’, ‘mysql’);
define(‘DB_USER’, ‘testlink’);
define(‘DB_PASS’, ‘mypassword’);
define(‘DB_HOST’, ‘localhost’);
define(‘DB_NAME’, ‘testlink’);
define(‘DB_TABLE_PREFIX’, ”);
?>

Once that’s been done, you can log into TestLink by pointing your browser at your TestLink site.

解決方式:
在testlink目錄中建立config_db.inc.php檔案,並拷貝php的程式碼即可

[[email protected] testlink]$ vim config.inc.php
[[email protected] testlink]$ touch config_db.inc.php; vim config_db.inc.php

登陸:
http://192.168.1.28/testlink
預設登陸賬號密碼都是admin

警告資訊:
你需要注意一些安全警告. 檢視詳細資訊在檔案: /var/www/testlink/logs/config_check.txt. 
要禁用警告輸出,設定 $tlCfg->config_check_warning_mode = ‘SILENT’;

[[email protected] testlink]# vim config.inc.php

修改
$tlCfg->config_check_warning_mode = ‘FILE’; 

$tlCfg->config_check_warning_mode = ‘SILENT’;

修改頁面顯示語言:
登陸後進入個人賬號修改語言選擇即可

配置SMTP:

[[email protected] testlink]# vim config.inc.php
// ----------------------------------------------------------------------------
/* [SMTP] */
/**
* @var string SMTP server name or IP address ("localhost" should work in the most cases)
* Configure using custom_config.inc.php
* @uses lib/functions/email_api.php
*/
$g_smtp_host        = 'mytest.com.cn';  # SMTP server MUST BE configured
# Configure using custom_config.inc.php
$g_tl_admin_email     = '[email protected]'; # for problem/error notification
$g_from_email         = '[email protected]';  # email sender
$g_return_path_email  = '[email protected]';
/**
* Email notification priority (low by default)
* Urgent = 1, Not Urgent = 5, Disable = 0
**/
$g_mail_priority = 5;
/**
* Taken from mantis for phpmailer config
* select the method to mail by:
* PHPMAILER_METHOD_MAIL - mail()
* PHPMAILER_METHOD_SENDMAIL - sendmail
* PHPMAILER_METHOD_SMTP - SMTP
*/
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
/** Configure only if SMTP server requires authentication */
$g_smtp_username    = '[email protected]';  # user
$g_smtp_password    = 'testlink_psw';  # password

刪除使用者:
網頁無法刪除賬號
進入mysql刪除:

[[email protected] testlink]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 106
Server version: 5.1.58 MySQL Community Server (GPL) by Utter Ramblings
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
-------------------- 
| Database           |
-------------------- 
| information_schema |
| mantisbt           |
| mysql              |
| test               |
| testlink           |
-------------------- 
5 rows in set (0.03 sec)
mysql> use testlink;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from users;
---- --------- ---------------------------------- --------- 
| id | login   | password                         | role_id |
---- --------- ---------------------------------- --------- 
|  1 | admin   | 21232f297a57a5a743894a0e4a801fc3 |       8 |
|  2 | test123 | e10adc3949ba59abbe56e057f20f883e |       5 |
---- --------- ---------------------------------- --------- 
4 rows in set (0.00 sec)
mysql> delete from users where login='test123';
Query OK, 1 row affected (0.00 sec)
mysql> select * from users;
---- ------- ---------------------------------- --------- 
| id | login | password                         | role_id | 
---- ------- ---------------------------------- --------- 
|  1 | admin | 21232f297a57a5a743894a0e4a801fc3 |       8 |
---- ------- ---------------------------------- --------- 
1 row in set (0.00 sec)
mysql>