WinXP+MySQL+Perl+IIS环境下安装Bugzilla3.1.2 2008-06-10 15:07

字号:    
第一步:安装Bugzilla

下载并安装Bugzilla

下载Bugzilla http://bugzilla.org/download.html

本文是以Bugzilla3.1.2版本为例子进行安装,同时可以在网站上找到相应的汉化包,感谢汉化作者为我们提供的方便与支持。

下载解压缩到C:\Bugzilla ,保证Bugzilla文件放在C:\Bugzilla文件夹下,避免解压时生成多余的文件夹。


第二步:安装MySQL

MySQL

下载 MySQL 4.1.22(版本mysql-4.1.22-win32 

下载MySQL "Windows Essentials"版本: http://dev.mysql.com/downloads/mysql/4.1.html

不推荐使用MySQL 5.x 

可以选择典型(Typial)安装MySQL,笔者安装时选择的自定义安装,并将安装目录设置为:C:\mysql 

创建Bugs数据库和用户

使用mysql 命令行创建,打开开始菜单-运行,输入cmd,打开命令行窗口进入 C:\mysql\bin>

需要输入的蓝字命令如下:

C:\mysql\bin>mysql --user=root -p mysql

Enter password: ******** password

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 15 to server version: 4.0.20a-debug 

Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 

mysql> create database bugs;  

Query OK, 1 row affected (0.11 sec) 

mysql> grant all privileges on bugs.* to 'bugs'@'localhost' identified by 'password';

Query OK, 0 rows affected (0.03 sec) 

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec) 

mysql> quit  

Bye 

C:\mysql\bin> 

C:\mysql\bin>mysql --user=root -p mysql

Enter password: ******** password

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 15 to server version: 4.1.11-nt 

Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 

mysql> set password for 'bugs'@'localhost' = OLD_PASSWORD('password');

Query OK, 0 rows affected (0.00 sec) 

mysql> quit  

Bye

C:\mysql\bin>

第三步:安装ActiveState Perl

下载ActiveState Perl 5.8.1 或更高的版本 (版本:ActivePerl-5.8.1.807-MSWin32-x86.msi

下载ActiveState Perl 5.8.1 或更高的版本:

http://activestate.com/Products/Download/Download.plex?id=ActivePerl   

安装Perl

ActiveState Perl 安装到C:\Perl

创建Temp目录 

创建 C:\Temp 目录确保系统在访问时进行更改。

安装 Modules

Bugzilla 需要安装一些perl模块请确保你的计算机能连接到internet所有需要模块都在http://landfill.bugzilla.org/ppm/  http://theoryx5.uwinnipeg.ca/ppms http://theoryx58S.uwinnipeg.cappms

在开始->程序-> ActiveState ActivePerl 5.8-> Perl Package Manager

进入DOS命令行按如下蓝字操作在安装到Template-Toolkit时注意按提示填写完成的安装路径。

C:\>ppm 该版本直接在Dos下输入是不能进入ppm

PPM - Programmer's Package Manager version 3.1.

Copyright (c) 2001 ActiveState Corp. All Rights Reserved.

ActiveState is a devision of Sophos. 

Entering interactive shell. Using Term::ReadLine::Stub as readline library.

Type 'help' to get started.

ppm> rep add Bugzilla http://landfill.bugzilla.org/ppm

Repositories:

[1] ActiveState PPM2 Repository

[2] ActiveState Package Repository

[3] Bugzilla

安装如下包:

Checking perl modules...(必须的,版本必须大于等于需要的版本)

CGI (v2.93)TimeDate (v2.21)PathTools (v0.84)DBI (v1.41)Template-Toolkit (v2.12)Email-Send (v2.16)

Email-MIME-Modifier (any)

Checking available perl DBD modules...

DBD-Pg (v1.45)DBD-mysql (v2.9003)

The following Perl modules are optional:

GD (v1.20)Chart (v1.0)Template-GD (any)GDTextUtil (any)GDGraph (any)XML-Twig (any)MIME-tools (v5.406)libwww-perl (any)PatchReader (v0.9.4)PerlMagick (any)perl-ldap (any)RadiusPerl (any) SOAP-Lite (any)HTML-Parser (v3.40)HTML-Scrubber (any)Email-MIME-Attachment-Stripper (any)

Email-Reply (any)mod_perl (v1.999022)CGI (v3.11)Apache-DBI (v0.96)

 

* NOTE: You must run any commands listed below as Administrator.

* In order to install the modules listed below, you first have to run the following command as an Administrator:

ppm repo add theory58S http://theoryx5.uwinnipeg.ca/ppms

ppm repo add theory5 http://theoryx5.uwinnipeg.ca/ppms

 

* Then you have to do (also as an Administrator):

ppm repo up theory58S

* Do that last command over and over until you see "theory58S" at the top of the displayed list.

还需安装如下包:


ppm> install AppConfig

ppm> install TimeDate

ppm> install DBI

ppm> install DBD-mysql

ppm> install Template-Toolkit

ppm> install MailTools

ppm> install GD

ppm> install Chart

ppm> install GDGraph

ppm> install PatchReader

ppm> install Net::LDAP


关于Email-Send的安装:需要进行如下安装,否则版本太低。

ppm> install http://theoryx5.uwinnipeg.ca/ppms/Email-Send.ppd

install http://theoryx5.uwinnipeg.ca/ppms/HTML-Parser.ppd

第四步:配置 Bugzilla

checksetup.pl

如下在命令行中操作,将自动创建localconfig文件。

C:\>cd bugzilla

C:\bugzilla>perl checksetup.pl  

Checking perl modules ...

Checking for       AppConfig (v1.52)   ok: found v1.55

Checking for             CGI (v2.93)   ok: found v3.10

Checking for    Data::Dumper (any)     ok: found v2.121_04

Checking for    Date::Format (v2.21)   ok: found v2.22

Checking for             DBI (v1.38)   ok: found v1.48

Checking for      File::Spec (v0.84)   ok: found v3.05

Checking for      File::Temp (any)     ok: found v0.16

Checking for        Template (v2.08)   ok: found v2.13

Checking for      Text::Wrap (v2001.0131) ok: found v2001.09293

Checking for    Mail::Mailer (v1.65)   ok: found v1.67

Checking for        Storable (any)     ok: found v2.13 

The following Perl modules are optional:

Checking for              GD (v1.20)   ok: found v2.16

Checking for     Chart::Base (v1.0)    ok: found v2.3

Checking for     XML::Parser (any)     ok: found v2.34

Checking for       GD::Graph (any)     ok: found v1.43

Checking for GD::Text::Align (any)     ok: found v1.18

Checking for     PatchReader (v0.9.4)  ok: found v0.9.5 

Most ActivePerl modules are available at Apache's ppm repository.

A list of mirrors is available at

    http://www.apache.org/dyn/closer.cgi/perl/win32-bin/ppms/

You can add the repository with the following command:

    ppm rep add apache http://www.apache.org/dist/perl/win32-bin/ppms/ 

Checking user setup ... 

This version of Bugzilla contains some variables that you may want to change and adapt to your local settings. Please edit the file './localconfig' and rerun checksetup.pl 

The following variables are new to localconfig since you last ran checksetup.pl:   index_html cvsbin interdiffbin diffpath create_htaccess webservergroup db_driver db_host db_pass db_sock db_check 

C:\bugzilla>

编辑 localconfig

打开 C:\Bugzilla\localconfig 找到上一个步骤创建的localconfig文件用记事本编辑它内容如下请对照是否有蓝字所标出的内容如没有显示如下内容请在localconfig文件中修改。

#

# How to access the SQL database:

#

$db_host = "localhost";         # where is the database?

$db_port = 3306;                # which port to use

$db_name = "bugs";              # name of the MySQL database

$db_user = "bugs";              # user to attach to the MySQL database

$db_pass = 'password';

checksetup.pl

再次运行checksetup.pl 。这时将创建数据库相关表和初始化Bugzilla。操作如下。

C:\bugzilla>perl checksetup.pl

 

Most ActivePerl modules are available at Apache's ppm repository.

A list of mirrors is available at

    http://www.apache.org/dyn/closer.cgi/perl/win32-bin/ppms/

You can add the repository with the following command:

    ppm rep add apache http://www.apache.org/dist/perl/win32-bin/ppms/


 

Checking user setup ...

Creating data directory (./data) ...

Creating graphs directory...

Creating .htaccess...

Creating Bugzilla/.htaccess...

Creating ./data/.htaccess...

Creating ./template/.htaccess...

Creating ./data/webdot/.htaccess...

Precompiling templates ...

Checking for    MySQL Server (v3.23.41) ok: found v4.0.20a-debug

 

Creating table user_group_map ...

Creating table series_data ...

Creating table longdescs ...

Creating table dependencies ...

Creating table components ...

Creating table keywords ...

Creating table cc ...

Creating table duplicates ...

Creating table groups ...

Creating table flagtypes ...

Creating table profiles ...

Creating table products ...

Creating table bugs_activity ...

Creating table series_categories ...

Creating table keyworddefs ...

Creating table fielddefs ...

Creating table group_control_map ...

Creating table profiles_activity ...

Creating table group_group_map ...

Creating table user_series_map ...

Creating table bugs ...

Creating table series ...

Creating table versions ...

Creating table flagexclusions ...

Creating table logincookies ...

Creating table watch ...

Creating table bug_group_map ...

Creating table votes ...

Creating table attachments ...

Creating table flags ...

Creating table milestones ...

Creating table tokens ...

Creating table flaginclusions ...

Creating table quips ...

Creating table namedqueries ...

Creating initial dummy product 'TestProduct' ...

Populating duplicates table...

Creating duplicates directory...

Migrating old chart data into database ...

Adding group tweakparams ...

Adding group editusers ...

Adding group creategroups ...

Adding group editcomponents ...

Adding group editkeywords ...

Adding group admin ...

Adding group editbugs ...

Adding group canconfirm ...

 

Inserting values into the 'priority' table:

'P1' sortkey: 100

'P2' sortkey: 200

'P3' sortkey: 300

'P4' sortkey: 400

'P5' sortkey: 500

Inserting values into the 'bug_status' table:

'UNCONFIRMED' sortkey: 100

'NEW'         sortkey: 200

'ASSIGNED'    sortkey: 300

'REOPENED'    sortkey: 400

'RESOLVED'    sortkey: 500

'VERIFIED'    sortkey: 600

'CLOSED'      sortkey: 700

Inserting values into the 'rep_platform' table:

'All'       sortkey: 100

'PC'        sortkey: 200

'Macintosh' sortkey: 300

'Other'     sortkey: 400

Inserting values into the 'resolution' table:

''           sortkey: 100

'FIXED'      sortkey: 200

'INVALID'    sortkey: 300

'WONTFIX'    sortkey: 400

'DUPLICATE'  sortkey: 500

'WORKSFORME' sortkey: 600

'MOVED'      sortkey: 700

Inserting values into the 'bug_severity' table:

'blocker'     sortkey: 100

'critical'    sortkey: 200

'major'       sortkey: 300

'normal'      sortkey: 400

'minor'       sortkey: 500

'trivial'     sortkey: 600

'enhancement' sortkey: 700

Inserting values into the 'op_sys' table:

'All'     sortkey: 100

'Windows' sortkey: 200

'Mac OS'  sortkey: 300

'Linux'   sortkey: 400

'Other'   sortkey: 500


SMTP: 59.151.4.244

Looks like we don't have an administrator set up yet.  Either this is your

first time using Bugzilla, or your administrator's privileges might have

accidently been deleted.

Enter the e-mail address of the administrator: chinabnutian@163.com

You entered chinabnutian@163.com'.  Is this correct? [Y/n] y

Enter the real name of the administrator: chinabnutian

Enter a password for the administrator account: password

Please retype the password to verify: password

'chinabnutian@163.com' is now set up as an administrator account. 

C:\bugzilla>

参数配置

现在就可以通过http://localhost/ 登陆Bugzilla至此你就能使用等待以久的Bugzilla缺陷跟踪系统了。 

打开登陆页面后,使用上面你输入的邮箱和密码就可以登陆了,在登陆页面右下角点选Parameters设置。

配置Bugzilla主要参数

Bugzilla的参数配置可以由管理员登录后,点击Parameters进入。不过似乎通过配置页面修改不能生效。可以直接修改data/params文件中的参数。

maintainer: 可以输入管理员的email

Urlbase: 输入当前bugzilla所在服务器的地址。例如http://domainserver/bugzilla

LDAPserver: LDAP服务器地址

LDAPbinddn: 如果你的LDAP不允许匿名绑定,这里需要填入LDAP server的管理员帐户和密码。格式cnuserpassword

LDAPBaseDN: 鉴别用户的Search依靠

LDAPuidattribute: 包含用户登录信息的属性,比如uid,具体要从LDIF文件中获取(可以在服务器上由ldifde.exe导出)

LDAPmailattribute: 包含用户email信息的属性

LDAPfilter: LDAP Search是的筛选条件

user_verify_class: 用户校验方式的选择。DB表示依赖与bugzilla自身的数据库对用户验证。LDAP表示用LDAP server 管理用户验证。只有选择了LDAP方式,上面的所有LDAP的设置才生效。

mail_delivery_method: 邮件的提交模式。Windows下选用smtp方式

smtpserver: 邮件服务的提供商。mail_delivery_method选择了smtp方式才生效。

第五步配置IIS

配置IIS

1.       打开【控制面板】->【管理工具】->Internet 服务管理器】,在【默认 Web 站点】点按右键选择【属性】->【主目录】->【配置】,在【应用程序映射】中点击【添加】,增加如下资料:

2.       Perl脚本解析器:(*.pl)

可执行文件: D:\Perl\bin\perl.exe "%s" %s

扩展名: .pl

仅限于: GET,HEAD,POST

3.       CGI脚本解析器:(*.cgi)

可执行文件: D:\Perl\bin\perl.exe "%s" %s

扩展名: .cgi

仅限于: GET,HEAD,POST

4.       默认 Web 站点】->【新建】->【虚拟目录】:

别名:Bugzilla,访问目录:D:\Bugzilla,访问权限中增加【写入】权限。

5.       选择刚建立的虚拟目录Bugzilla

右键选择【属性】-> 【文档】。【默认文档】中增加index.cgi

 

第六步:Bugzilla其他信息

Bugzilla汉化包

http://bugzilla.org/download.html 里能找到相应的bugzilla 汉化包,本文的例子包使用的是2.20版本的。在包内有汉化的相关内容,很容易就能汉化。  

本文内容相关

为了能更好的安装和调试Bugzilla,推荐下列网站,以供参考。 

http://httpd.apache.org/docs-2.0/mod/core.html#scriptinterpretersource

http://support.microsoft.com/default.aspx?scid=kb;en-us;231998

http://support.microsoft.com/default.aspx?scid=kb;en-us;245225 

如果还有一些疑问,关于windows下在安装Bugzilla更详尽的内容请参考:http://www.bugzilla.org/docs/win32install.html

 

安装配置过程中,可能会遇到如下问题,这些都是能够解决的。

1 修改bugzilla的几个状态
2 解决输入中文报错,英文正常的问题
3 修改提交product后,不能立即查看新增项目的问题
4 修改增加bug成功,但是mail发送不出去的情况
5 解决MySQL中文显示乱码问题
 
1 修改bugzilla的几个状态(可以用MySQL CC图形化操作,比较简单)

1、  Select * from priority; P1,P2,……,P5

2、  Select * from bug_status; unconfirmed, new, assigned, reopened, resolved

3、  Select * from rep_platform; All,PC,Macintosh

4、  Select * from resolution; fixed, invalid, woncfix, duplicated, workform

5、  Select * from bug_severity; blocker, critical, major, normal,

2 解决输入中文报错,英文正常的问题

run contrib/recode.plc:\Bugzilla下执行解决增加product输入中文报错的问题。

3 修改提交product后,不能立即查看新增项目的问题

设置internet选项->internet临时文件->设置->勾选  每次启动Internet Explorer时检查 解决Bugzilla add Product时查看不到的情况。

4 修改增加bug成功但是mail发送不出去的情况

1、修改C:\Bugzilla\data\params下的mailform’mailform’=>chinabnutian@163.com’

因为:bugzilla界面修改无效,所以要修改此配置文件。

‘maintainer’=>’chinabnutian@163.com’

2、到http://theoryx5.uwinnipeg.ca/ppms/下安装 install Email-MIME-Creator --force

安装信息如下:


Email-SimpleV2.0003

Email-MIME-ContentTypeV1.014

Email-MIME-EncodingV1.371

HTML-TypesV1.18

Email-MIMEV1.861

Class-InspectorV1.16

Module-PluggbaleV3.1

Email-AbstractV2.132

Time-PieceV1.10

TimeDateV1.16

Email-DateV1.102

Email-Simple-CreatorV1.422

Email-AddressV1.888

Email-MessageIDV1.351

Email-MIME-ModifierV1.442

Email-MIME-CreatorV1.454


5 解决MySQL中文显示乱码问题

Cmd登陆mysqlmysql -- user=root –p mysql

set   names   'gbk '
 注:使用公司自己的服务器,本文档写的邮件地址都是瞎写的。
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
网易公司版权所有 ©1997-2009