testlink 1.9.8 Win7 64位操作系统下搭建

来源:互联网 发布:淘宝联盟在线客服 编辑:程序博客网 时间:2024/05/17 22:52

本文转载文章链接:http://my.oschina.net/u/2270174/blog/343807,根据自己的具体情况,稍有删改或注释而已。

 

一、安装软件准备

1、Apache(httpd-2.4.16-win64-VC11)

2、PHP(php-5.6.12-Win32-VC11-x64)

3、MySQL(mysql-5.6.25-winx64)

4、testlink1.9.3


二、安装Apache

1、解压httpd-2.2.19-win64到 C:\testlink_bugzilla\httpd-2.4.16-win64-VC11(ps:存放路径可以自行设置)

2、在cmd命令行中进入C:\testlink_bugzilla\httpd-2.4.16-win64-VC11\Apache24\bin目录,执行httpd -k install

cmd命令行一定要以管理员权限打开

3、修改C:\testlink_bugzilla\httpd-2.4.16-win64-VC11\Apache24\conf\httpd.conf

(1)   #ServerRoot "c:/Apache24"   此为注释掉的语句
      ServerRoot "c:/testlink/httpd-2.4.16-win64-VC11/Apache24"

    路径中使用斜杠而不是反斜杠(反斜杠会被当作转义字符),在路径最后不要有斜杠(即Apache24后不要有斜杠)
(2)往下找到apache开启的功能模块:#LoadModule vhost_alias_module modules/mod_vhost_alias.so

模块后面添加:

LoadModule php5_module "C:\testlink_bugzilla\php-5.6.12-Win32-VC11-x64/php5apache2_4.dll"
PHPiniDir "c:/windows/php.ini"    
  //   php.ini   文件在下文配置php时修改编辑,并拷贝到c:/windows/目录下
AddType application/x-httpd-php .html .htm .php 


(3)继续往下,找到

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.

修改DocumentRoot和Directory为:

DocumentRoot "C:/testlink_bugzilla"
<Directory "C:/testlink_bugzilla">

4、再次在命令提示符 执行 httpd -k start 没有错误即服务器启动成功

5、IIS默认80端口,因此修改一下httpd.conf中listen端口为81,否则会出现冲突。


三、配置PHP

1、PHP目录解压到C:\testlink_bugzilla\php-5.6.12-Win32-VC11-x64\

2、将php.ini-development修改成php.ini

3、打开php.ini,找到extension_dir,修改其值为C:\testlink_bugzilla\php-5.6.12-Win32-VC11-x64\ext

; On windows:
 extension_dir = "C:\testlink_bugzilla\php-5.6.12-Win32-VC11-x64\ext"

4、找到扩展列表,

;extension=php_gd2.dll

;extension=php_mysql.dll
;extension=php_mysqli.dll

去掉前面的“;”,即为开启该扩展。

php.ini  文件拷贝到c:/windows/目录下

5、在C:\testlink_bugzilla\下创建一t.php文件,内容为
           <?php
                  phpinfo();
           ?>
然后在浏览器地址栏中输入http://localhost:81/t.php

看到如下图示信息表示配置成功(注:图中框起来的地方要格外注意 看信息是否可以出来)

四、安装MySQL

    MySQL数据库在前文搭建bugzilla时已经安装,这里不在赘述。

   最后,在C:\testlink_bugzilla\下创建cc.php:

<?php

$link=mysql_connect("localhost","root","******root用户的密码******");

if(!$link) echo "link  failed ! ";

else echo "link mysql  succeed ! ";

?>

然后在浏览器上输入http://localhost:81/cc.php,若出现如下字样:
link mysql  succeed !


表明数据库连接已经成功。

五、安装testlink

1、testlink1.9.3解压到C:\testlink_bugzilla\testlink\testlink-1.9.8下。

2、访问http://localhost:81/testlink/testlink-1.9.3/login.php开始安装wizard安装 ,在用到数据库的时候填写“root”用户和密码

    安装过程中遇到问题:

 a.点击安装提示:


Checking if /var/testlink/logs/ directory exists [S]  Failed!
Checking if /var/testlink/upload_area/ directory exists [S]  Failed! 

解决方法:

在config.inc.php修改

$tlCfg->log_path = TL_ABS_PATH . 'logs' . DIRECTORY_SEPARATOR ;
$g_repositoryPath = TL_ABS_PATH . "upload_area" . DIRECTORY_SEPARATOR;

 

3、装成功之后 输入http://loacalhost:81/testlink/login.php 就可以打开testlink 开始使用了,登录的用户和密码都是“admin”


登录之后,有如下的警告:

Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\testlink_bugzilla\testlink\testlink-1.9.8\config.inc.php on line 757

Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\testlink_bugzilla\testlink\testlink-1.9.8\config.inc.php on line 1363

 

解决办法:

在config.inc.php文件前面添加
date_default_timezone_set("PRC");


在对服务器进行修改配置时要注意几点:

1、cmd一定要用管理员权限打开;

2、更改php.ini后要重启Apache服务器,在cmd中执行:httpd  -k  stop;    httpd  -k  start,或者httpd  -k  restart;

3、路径中都用斜杠而不是反斜杠。

4、有时无法登录服务器,重启Apache服务器即可,httpd  -k  restart;

0 0