您的位置:首页 > 其它

BUGZILLA在windows下的安装

2013-09-15 10:14 302 查看
BUGZILLA在windows下的安装

一. 安装MySQL数据库

下载 MySql 4.x: http://www.mysql.com/ ,我用的版本是mysql4.1.22
for win32

安装请看如何在Windows平台下安装MySQL(http://www.websina.com/bugzero/faq/database-mysql-win.html)。

二.安装activeperl

下载activeperl最新版本:http://downloads.activestate.com/ActivePerl/Windows/,可以安装需要选择所要的版本,我选用的是5.8.822,现在最新的版本是5.10.1002,一开始是我用的是5.10.1002这个版本,发现PPM中包含的模块反而没有5.8.822这个版本来的全,所以最终还是使用了5.8.822这个版本.但是要注意的是bugzilla3.0.3及以上版本要求activeperl版本在5.8.1以上.

安装activeperl,这个没什么可说的,默认安装即可.

三.安装bugzilla

bugzilla并不需要安装,下载完后解压到本地某个目录下即可.

http://www.bugzilla.org/download/现在最新的版本是3.1.3,我装的就是这个版本.

安装完后,在dos下执行checksetup.pl,看缺少哪几个perl
module,具体命令如下:

C:\Perl\bin>perl
C:\bugzilla-3.1.3\checksetup.pl

可以看出,我的perl
和bugzilla都放在C盘根目录下,执行后,发现有很多模块需要安装:

Checking perl modules...

Checking for

CGI
(v2.93) ok: found v3.29

Checking for

TimeDate
(v2.21) not found

Checking for

PathTools
(v0.84) ok: found v3.25

Checking for

DBI
(v1.41) ok: found v1.58

Checking for Template-Toolkit
(v2.15) not found

Checking for
Email-Send
(v2.16) not found

Checking for Email-MIME-Modifier (any)
not
found

Checking available perl DBD modules...

Checking for

DBD-Pg
(v1.45) not found

Checking for

DBD-mysql
(v4.00) not found

Checking for
DBD-Oracle
(v1.19) not found

The following Perl modules are optional:

Checking for

GD
(v1.20) not found

Checking for

Chart
(v1.0)
not
found

Checking for
Template-GD
(any)
not found

Checking for
GDTextUtil
(any)
not found

Checking for

GDGraph
(any)
not found

Checking for

XML-Twig
(any)
not found

Checking for
MIME-tools
(v5.406) not found

Checking for
libwww-perl
(any)
ok: found
v2.036

Checking for
PatchReader
(v0.9.4) not found

Checking for
PerlMagick
(any)
not found

Checking for

perl-ldap
(any)
not found

Checking for
RadiusPerl
(any)
not found

Checking for

SOAP-Lite
(any)
ok: found
v0.55

Checking for
HTML-Parser
(v3.40) ok: found v3.56

Checking for
HTML-Scrubber (any)
not
found

Checking for Email-MIME-Attachment-Stripper (any)
not
found

Checking for
Email-Reply
(any)
not found

Checking for

mod_perl
(v1.999022) not found

Checking for

CGI
(v3.11) ok: found v3.29

上面是执行的一部分结果,可以看到必须安装的模块有7个,其中CGI,DBI,PATHTOOL三个已经安装;可选的安装有三个,就是数据库的三个,根据选择数据库的不同,分别安装.因为我用的是mysql,所以一会就选择dbd-mysql进行安装;还有后面的一堆是可装可不装的,到时等需要用时再安装不迟.

接下来,我们就来安装这些模块.

四.安装perl modules

可以通过activeperl的PPM进行模块的安装.

打开 开始->程序->activeperl
5.8.8 bulid822->perl package
manager(PPM),打开如下图所示窗口:

对应(三)我们可以知道需要另外安装TimeDate (v2.21)
,Template-Toolkit (v2.15) ,Email-Send (v2.16),Email-MIME-Modifier
(any),DBD-mysql (v4.00) 这五个模块.

Template-Toolkit (v2.15)的安装

我们在PPM中查找,发现了Template-Toolkit
(v2.15),选中它,点右键,点"install Template-Toolkit
2.15",然后点击窗口第二栏的绿色箭头图标,也可以使用快捷键ctrl+enter,弹出一个对话框,点确定即可.

TimeDate (v2.21)的安装

TimeDate比较奇怪,在PPM上找到的TimeDate版本是1.16,但是直接在ppm上安装完了后,执行checksetup.pl,发现TimeDate安装成功,并且版本升级到了2.22,后来也没发现问题及原因.

Email-Send (v2.16)的安装

PPM上Email-Send的版本是2.05,无法支持bugzilla
3.1.3,需要通过其他网站下载包安装.

在dos下输入以下语句:

C:\Perl\bin>ppm install http://theoryx5.uwinnipeg.ca/ppms/Email-Send.ppd

点击enter ,PPM自动从http://theoryx5.uwinnipeg.ca/ppms上下载最新的Email-Send.ppd进行安装

此时执行结果提示:

ppm install failed: Installing Module-Pluggable-3.01 for Email-Send
would downgr

ade Devel::InnerPackage from version 0.3 to 0.2, Module:

luggable from version

3.6 to 3.01, and Module:

luggable::Object from version 3.6 to 0;
use --force to

install regardless

按照提示将命令改成C:\Perl\bin>ppm install
http://theoryx5.uwinnipeg.ca/ppms/Email-Send.ppd
--force,重新执行即可.

DBD-mysql (v4.00)的安装

在dos下输入以下语句:

C:\Perl\bin>ppm install http://theoryx5.uwinnipeg.ca/ppms/DBD-mysql.ppd

点击enter ,PPM自动从http://theoryx5.uwinnipeg.ca/ppms上下载最新的DBD-mysql.ppd进行安装

注:关于各个module的详细信息可以在下面的网站上进行搜索查看,如emailsend:

http://cpan.uwinnipeg.ca/dist/Email-Send

Email-MIME-Modifier的安装

在dos下输入以下语句:

C:\Perl\bin>ppm install http://theoryx5.uwinnipeg.ca/ppms/Email-MIME-Modifier.ppd

点击enter ,PPM自动从http://theoryx5.uwinnipeg.ca/ppms上下载最新的Email-MIME-Modifier.ppd进行安装

这样五个必须安装的module都已经安装完毕,重新执行checksetup.pl.

在bugzilla目录下生成localconfig文件.修改localconfig:

$db_driver = 'mysql';

# The DNS name of the host that the database server runs on.

$db_host = 'localhost';

# The name of the database

$db_name =
'bugs';

# Who we connect to the database as.

$db_user = 'bugs';

# Enter your database password here. It's normally advisable to
specify

# a password for your bugzilla database user.

# If you use apostrophe (') or a backslash (\) in your password,
you'll

# need to escape it by preceding it with a '\' character. (\') or
(\)

# (Far simpler just not to use those characters.)

$db_pass = '';

# Sometimes the database server is running on a non-standard port.
If that's

# the case for your database server, set this to the port number
that your

# database server is running on. Setting this to 0 means "use the
default

# port for my database server."

$db_port = 0;

将$db_host改成mysql
server端的服务器,我装在本机,所以不用修改;

将$db_name = 'bugs';改成$db_name = 'bugzilla';
----bugzilla是我新建的BUG数据库的名称;

$db_user = 'bugs';改成$db_user = 'bug';
----bug是我登录bugzilla数据库的用户名;bugs是你mysql的用户名。
$db_pass =
'';改成$db_pass = 'bug';
----bug是我登录bugzilla数据库的用户bug的密码;这是你mysql数据库的密码。

$db_port = 0;改成$db_port = 3306;
----mysql安装默认端口是3306;

修改完成后,保存.重新执行checksetup.pl.

在dos窗口中可以看到在往数据库中创建相应的表结构.表结构创建完后,提示要求输入管理帐号的邮件,real
name和密码,输入后,继续执行,知道提示"Now that you have
installed Bugzilla......".

接下来我们要将bugzilla部署到iis上,以便项目成员可以通过URL进行访问.

五.部署bugzill到IIS上

首先安装IIS.

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

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

扩展名: .pl

限制为: GET,HEAD,POST

Executable: C:\Perl\bin\perl.exe -T "%s" %s

Extension: .cgi

Limited to: GET,HEAD,POST默认 Web
站点->新建->虚拟目录:

别名:Bugzilla,访问目录:C:\Bugzilla,访问权限中增加写入,执行权限。

选择刚建立的虚拟目录Bugzilla,右键选择属性->文档。默认文档中增加index.cgi。

在web服务扩展中,将perl CGI extension 设置为允许.

修改bugzilla目录下所有的cgi文件,将#!/usr/bin/perl
-wT替换为#!/usr/bin/perl -w

打开浏览器,键入 http://localhost/bugzilla/ 既可进入登录界面。

至此,bugzilla终于安装完毕.

当然,bugzilla还提供了其他的一些功能,如邮件发送,报表统计等,都不错,需要做另外的配置,下次再总结.

PS:我的操作系统是:win2003 R2 enterprise edition sp2
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: