Apache2.2.22+PHP5.2.17+MySQL5.0.51a+Mantis1.2.11+TestLink1.9.4搭建测试管理架构

来源:互联网 发布:有诗意的淘宝店名字 编辑:程序博客网 时间:2024/04/29 12:49

Apache2.2.22+PHP5.2.17+MySQL5.0.51a+Mantis1.2.11+TestLink1.9.4安装配置

 搭建一个测试管理系统和Bug跟踪管理系统,选用开源免费的TestLink和Mantis。运行环境配置为:Apache+PHP+MySQL。将环境搭建过程中的经验进行了总结。

1、各软件版本及下载地址:


TestLink1.9.4:

manti1.2.11   http://www.mantisbt.org/download.php
mysql5.0.51a    http://downloads.mysql.com/archives.php?p=mysql-5.0&v=5.0.51a
PHP5.2.17     http://windows.php.net/download(注意:windows系统环境下安装不需要下载VC6版本)
apache2.2.22  http://archive.apache.org/dist/httpd/httpd-2.2.11-win32-src.zip


2. 安装步骤
  1)解压、安装下载的软件,假设各软件的安装目录为
  MySQL:D:\MySQL Server 5.0
  Php:d:\php-5.2.17
  Apache:D:\Program Files\Apache Software Foundation\Apache2.2

TestLink:d:\TestServer\testlink

Mantis:d:\TestServer\mantisbt

PhpMyAdmin解压后安装在Apache:D:\Program Files\Apache Software Foundation\Apache2.2\htdocs目录下。
 
  a.安装apache2.2.22
    运行安装程序,安装时选择安装给当前用户,采用8080端口,不要安装成服务,对我来说没必要。安装后同样可以再安装成service  .  详细请参考:  apahce在windows下的安装指南 http://httpd.apache.org/docs-2.0/platform/windows.html
在IE地址栏输入http://localhost:8080/ http://127.0.0.1:8080/,可以看到 

It works!

表明安装成功。如果前面是安装成80端口的服务,则输入http://localhost/或http://127.0.0.1/

  b.MySQL安装过程,请参照:http://blog.csdn.net/zhuang0417/article/details/8002884

  c.其它的软件直接解压到自己想要的目录。当然如果你下载的是installer也是一样的,直接运行安装程序,无非是安装
  后多了几个启动的快捷菜单外加一些默认设置罢了。


 3、为apache配置php
  打开D:\Program Files\Apache Software Foundation\Apache2.2\conf目录下httpd.conf文件,添加如下内容到文件尾

#PHP 5
 LoadModule php5_module "D:/php-5.2.17/php5apache2_2.dll"(这个要注意,如果是apache的版本是2.0,则选择php5apache2.dll)
 AddType application/x-httpd-php .php  //注意在.php和.htm前有一个空格
 AddType application/x-httpd-php .htm
(.htm, .php为可执行php语言的扩展名,也可加html, php3, php4,甚至txt)
4、php配置
 a) 将D:\php-5.2.17下的php.ini-dist复制一份,并改名为php.ini,并将其剪到系统所在目录下(如放在2000/NT的WINNT/system32, XP的Windows/目录下),
  查找include_path,改为include_path=".;D:\php-5.2.17\PEAR"
  查找extension_dir,改为extension_dir="D:\php-5.2.17\ext"
  查找php_mysql.dll,将这一行前面的“;”号去掉
  保存文件

b) windows环境
  将c:php-5.0.3添加到path中
5、创建数据库

  运行c:mysql-5.0.2binmysqld-nt,启动数据库
  mysql -uroot -p
  create database bugtracker;
  use bugtracker;
  source c:mantis-0.19.2sqldb_generate.sql;
当然你也可以用其它GUI工具创建数据库。
6、Mantis安装及配置

a)为apache安装mantis系统
   打开D:\Program Files\Apache Software Foundation\Apache2.2\conf目录下httpd.conf文件,添加如下内容到文件尾

Alias /mantis "D:/mantisbt-1.2.11/"

<Directory "D:/mantisbt-1.2.11/">
  Options Indexes
  AllowOverride None
  Order allow,deny
  Allow from all
 </Directory>

查找DirectoryIndex,添加index.php到后面。像这样DirectoryIndex index.html index.html.var index.php

b)mantis配置

  将c:mantis-0.19.2下的config_inc.php.sample复制一份,并改名为config_inc.php
如果你改了root的密码,打开这个文件,设置$g_db_password='yourpassword'

c)mantis的汉化,找到mantis的配置文件配置一下就好了。方法如下:

 在mantis目录下找到config_defaults_inc.php,用支持php格式的编辑器打开。里面有一项是$g_default_language  = 'english';将english修改成chinese_simplified,点击保存,保存文件。重新启动iis,这时再查看mantis已经汉化成功了。

d)启动mantis
  首先启动apache和mysql,
  在址栏输入http://localhost:8080/mantis/index.php或者http://localhost/mantis/index.php
  应该可以看到初始页面了。用amdinistrator/root登录,mantis 开始为你工作。  

7、testlink安装及配置

a)修改Apache配置文件httpd.conf

# Manually Add for Testlink
 Alias /testlink "d:\TestServer\mantisbt/"
 <Directory "d:\TestServer\mantisbt/">
         Options Indexes
         AllowOverride None
         Order allow,deny
         Allow from all
 </Directory>
 # End Manually Add for Testlink

b)testlink配置,testlink/config.inc.php

php:Go to config.inc.php and log directory ($tlCfg->log_path) edit the path toC:\xampp\testlink\logs and upload directory ($g_repositoryPath) toC:\xampp\testlink\upload_area

汉化:$tlCfg->default_language = 'en_GB';改为$tlCfg->default_language = 'zh_CN';

$tlCfg->config_check_warning_mode = 'FILE';改为 $tlCfg->config_check_warning_mode = 'SILENT';

c)Testlink安装检测页面,建议将max execution time 设置为120秒咧,官方建议就照做呗,
查找max_execution_time 修改为max_execution_time = 120     ;
d)安装Testlink咯,打开浏览器输入:http://localhost/testlink/install/index.php,在出现的页面点击"New Installation",然后勾选"accept .....", 点击continue按钮,随后出现的页面中应该有很多OK啦,

e)有一处关于idle timewarning信息,在php.ini文件里可修改。找到了session.gc_maxlifetime = 1860 这是最小值,30分30秒都不行,31分即可,呵呵。接着点击continue,在随后页面依次填写 链接MySQL数据的用户名/密码(这个填root及密码吧),testlink将在MySQL创建的数据库名、用户名、密码(这个自己定义哦),填好后 点击"rocess TestLink Setup!"按钮吧。

f)如在最下面出现"Installation was successful!"表示安装成功,点击后面的链接来登录Testlink吧。

g)默认用户名/密码,admin/admin

8、整个配置过程中的几个注意事项:

1、在path中设置php的工作目录,整个配置完成后,需要重启机器,否则可能碰到诸如 database type not support的错误。

2、把libmysql.dll拷贝到system32目录下。(否则,用MySql数据库的时候,可能引起Apache的httpd.exe应用程序异常)

3、修改Mantis目录下的admin/schema.php中的TYPE=MyISAM替换为ENGINE=MyISAM CHARACTER SET utf8(否则会报You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 9)

4、修改MySql数据库中的max_connections,max_questions等几个参数的值(修改mysql库中的user表),尽可能大,否则有可能安装Mantis的时候失败。

5、mantis/admin/check.php,可以通过这个页面检查各项配置,包括收发Mail。

原创粉丝点击