1. 环境及资料来源51Testing软件测试网c8[5yY"M-p5e
l Windows 2000 server SP4
bZ&c/n*C;G311030l Mantis1.0 http://www.mantisbt.org/download.php51Testing软件测试网fY0XpFvo
l Mysql4.1.x http://dev.mysql.com/downloads/mysql/4.1.html51Testing软件测试网9aTL8o n&GrdzT
l PHP5.1.4 http://www.php.net/downloads.php
R P[&a!yxh p311030l Apache2.0.58 http://httpd.apache.org/download.cgi51Testing软件测试网fx'J)w*O%w
2. 安装51Testing软件测试网$X$SgK[@h%B{Ig J
2.1 安装Apache
EAcl.Dz/Xx311030l 不选择安装为windows服务51Testing软件测试网S8[u8|!i
l 注意正确填写domain、servername、email
9RT'v? rk311030l 更改端口的方法:<ApacheDir>\Apache2\conf\httpd.conf,修改Listen参数
~F:ych[311030l 启动、停止、验证apache服务51Testing软件测试网0BFjNN
2.2 安装MySQL51Testing软件测试网?v [*D2[by{
l 选择标准配置51Testing软件测试网ME }dge
l 设置密码
9Ez+Na#t KF neL r&E3110302.3 本例子中的安装路径如下
!j(b3i:p$p'wg311030l D:\Program Files\Apache Group\Apache2\
b8D T_4F7of;cY311030l D:\Program Files\MySQL\MySQL Server 4.1\
;c_a*g m311030l C:\php-5.1.4
Q"~xcw$VA:LS311030l C:\mantis-1.0.0rc4
R+jd*c,@x?C3110303. 配置51Testing软件测试网%z6_y C7n?:x4@
3.1 为Apache配置php
Cw1y3qA(y:|}311030l 打开<Apache安装目录>\conf\httpd.conf文件,添加如下内容到文件尾
[A l!Wv;T*|311030#PHP 5
$}p:M4_4mKgY)E311030LoadFile "c:/php-5.1.4/php5ts.dll"
&pj_ TP_H1[ L}6@311030LoadModule php5_module "c:/php-5.1.4/php5apache2.dll"51Testing软件测试网SjcrFFnq~
AddType application/x-httpd-php .php
FOf _%u311030#PHP.ini path
cO~"Tjr.FW311030PHPIniDir "c:/php-5.1.4"51Testing软件测试网7{PY"w2O
3.2 Php配置
gX3M|Z2u311030l 将c:\php-5.1.4下的php.ini-dist复制一份,并改名为php.ini,编辑该文件51Testing软件测试网&uqmt g nN;QY
l 查找include_path,改为include_path=".;c:\php-5.1.4\pear"51Testing软件测试网PY"f4KI:}u
l 查找extension_dir,改为extension_dir="c:\php-5.1.4\ext"51Testing软件测试网OLi~vi#BE!`
l 查找php_mysql.dll,将这一行前面的“;”号去掉51Testing软件测试网'o5i%| ^2u0^
3.3 为apache配置mantis系统
T+G mi7@6X311030l 打开<Apache安装目录>\conf\httpd.conf文件,添加如下内容到文件尾51Testing软件测试网4q;Y ?RC+V*j5w
Alias /mantis "c:/mantis-1.0.0rc4/"51Testing软件测试网!B@$^+HE#ZD3M,P?~
<Directory "c:/mantis-1.0.0rc4/">51Testing软件测试网m?A%l)| dZb
Options Indexes51Testing软件测试网g$lr1M5pp7\
AllowOverride None51Testing软件测试网Mw n pl6Q&H
Order allow,deny
*U6tPD+]kJ311030Allow from all
N!yy9SI1P_311030</Directory>
ns!_@"l |8i^p&u311030l 查找DirectoryIndex,添加index.php到后面51Testing软件测试网}G&y-PH}R&Us
如:DirectoryIndex index.html index.html.var index.php
9h'N'h"j2d3110303.4 创建Mantis数据库51Testing软件测试网*k9e5s|P{f(y"?
l 修改scrīpt目录下的脚本,主要是mysql路径、数据库用户名、密码、数据库名
a;r8G1R~;RX"c311030l 执行initdb.bat,初始化数据库
8])V'y jw,O qs311030Initdb.sql,创建Mantis数据库并分配权限给mt用户,密码为mt
XA.v`?} SEB311030Db.sql,mantis自带的数据库初始化的脚本
G'h9CPyQa'O a311030initdb.bat,调用initdb.sql,连接到mysql数据库上,进行数据库初始化51Testing软件测试网.J*A r]5z1fK~
3.5 Mantis配置
xjWTe9W:Xv311030l 将C:\mantis-1.0.0rc4下的config_inc.php.sample复制一份,并改名为config_inc.php
mxC'hH311030l 配置config_inc.php中的数据库连接参数51Testing软件测试网!|B'f4aH9{2cT,g
$g_hostname = "localhost";51Testing软件测试网DMnx+y7SVy
$g_db_username = "mt";51Testing软件测试网"d.N kpiZ
$g_db_password = "mt";
1a+uL#f]1Ix311030$g_database_name = "mantis";51Testing软件测试网5X+{k'Nor"l"M
$g_db_type = "mysql";
8cy P9jE:} L#A311030说明:在config_defaults_inc.php中保存这Mantis的默认设置,用户自己的设置信息保存在config_inc.php中,如果某个选项在config_inc.php中有设置,则系统使用config_inc.php中的设置,否则使用config_defaults_inc.php的系统默认设置
9C:j"|VnE311030l 配置运行路径,将PHP的路径“C:\php-5.1.4”添加到path环境变量中51Testing软件测试网#Y`~Wr:j l
l 移除mantis目录下的admin目录51Testing软件测试网3Q5r7wUJi W
4. 开始使用
1d?&}i4_v-Z f311030l 启动apache和mysql服务
D:Nx#D/NG311030l 在IE地址栏输入http://<servername>:<port>/mantis/index.php,登录系统
0}L HY-K)fM.f.j311030l 管理员用户为:admin,密码为:123456
f#w r-wZg'z3110305. Mantis的高级配置
3g#x f3pPN'P&^3110305.1 语言及其它配置
H#[*? ZSdF[1n I311030l 设置默认语言为中文51Testing软件测试网.K'["K6dsZ]u
在c:\mantis-1.0.0rc4\config_inc.php文件后面添加
pN3A;Mm Iw311030$g_default_language = 'chinese_simplified';51Testing软件测试网e1b0f1W(ypT
l 上传文件设置
pC&j,F{.Ep`h311030在config_inc.php中添加:
,b2i@)kz'b!I311030$g_allow_file_upload=ON;
*r"~-@5wn%\~;{&T311030$g_file_upload_method=DISK;
;fo9x%d9I311030并且在c:\mantis-1.0.0rc4下面新建一个upload目录。 当你以管理员身份登录,新建项目时,在上传文件路径那一项填上upload即可,如果要为每一个项目指定不同的目录,可以先在upload下建一个<projectname>,在上传文件路径那一项填上upload\<projectname>51Testing软件测试网0`$z0]'J&Fp }$DD?c"X
注意最好不要用中文目录名,目录名中间也不要带空格
G8@%{.L7w311030l 其它设置(可选)51Testing软件测试网Ljc bVq
#不在页面下部显示Mantis的版本号51Testing软件测试网s6?4b#]DY7t8E
$g_show_version = OFF; 51Testing软件测试网bYB8K]Bl _
#显示项目选择栏51Testing软件测试网1sC tAd z!m-| ml1ks
$g_show_project_menu_bar = ON; 51Testing软件测试网(sZ)X s1~.Z$?/|:Q
#在页脚不显示执行的查询次数
jhk7T-fq311030 $g_show_queries_count = OFF;
r5} Jfz4i$F7c311030#默认用户级别51Testing软件测试网V;m:t/gzk n
$g_default_new_account_access_level = DEVELOPER;
z2M?fb8@)W311030#浏览器标题51Testing软件测试网lbBM"cE}m)aV
$g_window_title =
PG6}0E!V B311030<