本文档描述了 TestLink 的安装部署和配置,下面的示例是基于 TestLink 的标准发布版本。 对于
群英汇的增强的 TestLink:
(下面的示例是基于 TestLink 的标准发布版本,而非群英汇增强版本) 安装要求:
数据库要求:
WEB服务器要求: Apache 1.3.x 或者 2.x以及Apache的更高版本,IIS 3或者更高的版本 PHP版本要求: TestLink 1.8系列版本都是用PHP 5.2来进行管理的,PHP 5.3的版本对TestLink 1.8系列不太合适。将要推出的TestLink 1.9在这两个PHP版本上都能很好地
工作 bug跟踪系统版本要求:
安装Mysql
1、下载MySQL的安装文件
安装MySQL需要下面两个文件:
MySQL-server-xxx-0.i386.rpm
MySQL-client-xxx-0.i386.rpm
下载地址为:www.mysql.com/downloads/mysql-4.0.html,打开此网页,下拉网页找到“Linux x86 RPM downloads”项,找到“Server”和“Client programs”项,下载需要的上述两个rpm文件。
2、安装MySQL
rpm文件是Red Hat公司开发的软件安装包,rpm可让Linux在安装软件包时免除许多复杂的手续。该命令在安装时常用的参数是 –ivh ,其中i表示将安装指定的rmp软件包,V表示安装时的详细信息,h表示在安装期间出现“#”符号来显示目前的安装过程。这个符号将持续到安装完成后才停止。
1)安装服务器端
在有两个rmp文件的目录下运行如下命令:
[root@test1 local]# rpm -ivh MySQL-server-xxx-0.i386.rpm
显示如下信息。
warning: MySQL-server-xxx-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]
。。。。。。(省略显示)
/usr/bin/mysqladmin -u root password \'new-password\'
/usr/bin/mysqladmin -u root -h test1 password \'new-password\'
。。。。。。(省略显示)
Starting mysqld daemon with databases from /var/lib/mysql
如出现如上信息,服务端安装完毕。测试是否成功可运行netstat看Mysql端口是否打开,如打开表示服务已经启动,安装成功。Mysql默认的端口是3306。
[root@test1 local]# netstat -nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
上面显示可以看出MySQL服务已经启动。
2)安装客户端
运行如下命令:
[root@test1 local]# rpm -ivh MySQL-client-xxx-0.i386.rpm
warning: MySQL-client-xx-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing... ########################################### [100%]
1:MySQL-client########################################### [100%]
显示安装完毕。
用下面的命令连接mysql,测试是否成功。
安装apache
yum install htttpd
安装php之前先升级一下centos系统自带的源里面的php版本(先升级源在执行
yum install php不升级默认安装的是php5.1.16安装testlink1.8.5需要升级到5.2.16)
以上默认安装就可以就这么简单你也可以下载软件、解压、编译、安装。
升级方法:
(1)vi /etc/yum.repos.d/nian.repo新建一个任意的.repo的文件写入内容:
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
(用root权限写)
(2)然后执行yum -y update php,如果提示“thread.error: can’t start new thread”,需要关闭fastestmirror。
位置:/etc/yum/pluginconf.d/fastestmirror.conf,将其中的enable=1改成enable=0。重新执行yum -y update php。
执行完成后,php -v看看版本是不是已经最新了?
四、整合apache与php
1、#vi etc/httpd/conf/httpd.conf些模块简单的修改(默认安装地址是这样,如果是编译安装的就找到相应地址修改就可以,如果找不到可以通过rpm –ql php查看安装路径)
在配置文件中添加如下:
AddType application/x-httpd-php .php .php3 .php4 .php5
2、
查找:(设置WEB默认文件)
DirectoryIndex index.html
替换为:
DirectoryIndex index.php index.html
3、
启动cgi,#AddHandler cgi-script. .cgi 去掉#打开CGI脚本服务
如果想同时运行扩展名为.pl
则改为:
AddHandler cgi-script. .cgi .pl
#service httpd restart重启一下apahce(httpd)服务
apache服务器的PHP配置完成。
(到此在执行yum install php命令,下面如果无法出现安装页面可以卸载php命令是
rpm –e php在完全所有安装php模块命令是yum install php*)
1、下载testlink1.8.5
wget http://cdnetworks-kr-2.dl.sourceforge.net/project/testlink/TestLink%201.8/TestLink%20 1.8.5/testlink_1.8.5.tgz
2、解压:tar –zxvf testlink1.8.5.tgz
3、检查下解压的文件是不是只有testlink一个文件夹保证其不嵌套其他文件,
mv testlink /var/www/html移动testlink到html下
然后到testlink下设置访问权限:cd /var/www/html/testlink
依次执行:# chmod 777 gui/templates_c
# chmod 777 logs
# chmod 777 upload_area
自动安装testlink
1、在浏览器中输入http://<yoursite>/testlink/install/index.php
2、点击New installation
Checking PHP version: OK! (4.3.9>= 4.1.0)
Checking if Register Globals = OFF: OK!
Checking if sessions are properly configured: OK!
Checking if ../gui/templates_c directory exists: OK!
Checking if ../gui/templates_c directory is writable: OK!
3、如果mysql没有设置密码可以通过命令:
/usr/bin/mysqladmin -u root password yunlifang
mysql> UPDATE user SET Password=PASSWORD('1111') WHERE user='root';
4、下面是页面要输入的内容Database login为root密码为数据库密码其它为testlink的数据库登陆名和密码可以随便填写。
Database login: root
Database password: 1111
TestLink DB login: root
TestLink DB password: 1111
5、请注意这句话
“After installation You will have the following login for TestLink Administrator.告诉我们默认登录名和密码都是admin
login name: admin
password : admin”
最后点击Setup TestLink! 按钮完成部署
通过http://you server ip/testlink进行访问
用户名密码均为admin
Vi /etc/php.ini
extension = "mssql.so"