好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

win7+bugzilla+apache+mysql+activePerl

目 录 一下载软件 ... 2 1.Bugzilla 2.MySQL. 2 3.ActivePerl 4.Apache 2.x. 2 5 .邮件 fake. 2 二安装、配置软件 ... 2 1 . Bugzilla 2.MySQL. 2 3.Perl 3 4. Apache. 5 5 配置 Bugzilla. 8 6 配置支持邮件发送 ... 10 7 汉化 Bugzilla. 10 三 Bugzilla

目 录

一下载软件 ... 2

1.Bugzilla

2.MySQL. 2

3.ActivePerl

4.Apache 2.x. 2

5 .邮件 fake. 2

二安装、配置软件 ... 2

1 . Bugzilla

2.MySQL. 2

3.Perl 3

4. Apache. 5

5 配置 Bugzilla. 8

6 配置支持邮件发送 ... 10

7 汉化 Bugzilla. 10

三 Bugzilla 迁移 ... 10

1 . Mysql/Bugzilla. 10

2.Perl/Apache. 11

3. 备份迁移 httpd.conf 11

4. 备份迁移 sendmail.exe. 11

四注意事项 ... 11

A .参考文献 ... 11

B .未完成的事情 ... 11

1.Linux 下安装 Bugzilla , ... 11

2. 升级到 2.20, 11


一 下载软件

所有资源可以去我的博客资源里下载: http://download.csdn.net/user/tongkp

1.bugzilla-4.1.3或更高版本

官网地址: http://bugzilla.org/download.html

2.MySQL

官网地址:下载 MySQL "Windows Essentials" 版本: http://dev.mysql测试数据/downloads/mysql/4.1.html

3. ActivePerl

下载 ActivePerl_5.1 或更高的版本

官网地址: http://activestate测试数据/Products/Download/Download.plex?id=ActivePerl

要提供邮箱之类的信息 .

4.Apache 2.x

官网地址:下载 Apache HTTP Server version 2.x 或更高版本: http://httpd.apache.org/download.cgi

5 .邮件 fake

http://HdhCmsTestglob测试数据.au/sendmail/sendmail-bugzilla-setup.exe , 据网上的文档以及该软件的使用文档所述,可以下载一个压缩包版本,解开之后配置即可,但事实上是

这么做,还是发不了邮件,而下载这个安装文件去安装,然后调整一下配置,才可以发送邮件,不太理解前者为何不能工作。

二 安装 、配置软件

1 . Bugzilla2.1.8

解压压缩包即可,可解压至任意位置,为使用方便,可以解到根目录。为了下面的描述清晰起见,本文档假定解压至 C:/bugzilla ,注意不要重复创建 bugzilla 文件

夹,压缩包中已经带了路径 bugzilla 。

2.MySQL

安装 :

可以选择典型(Typial)安装MySQL,将安装目录设置为: C:/mysql 。

创建Bugs数据库和用户

使用 mysql 命令行创建,打开命令行窗口进入 C:/mysql/bin>

说明:网上的文档,包括BUGZILLA上推荐的一篇文档中,在输入mysql的用户名和密码时都有错误(通过-p传入密码时多了一个空格),因此导致在传入密码的情况

下,还需再输

入一次密码,就是下面有删除线的红色字体那行,只要输对了mysql的传参格式以及用户名和密码,是不需再次输入密码的。

正确的传mysql用户名和密码的格式是下列任意一种或组合:

mysql – u root – pmysql

mysql – uroot – pmysql

mysql --user=root --password=mysql

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

C:/mysql/bin> mysql – u root -pmysql

Enter password: ******** (该行不会出现,除非你把密码改了)

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

Your MySQL connection id is 9 to server version: 4.1.3-beta-nt

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 'bugs';

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 -uroot -pmysql

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

Your MySQL connection id is 10 to server version: 4.1.3-beta-nt

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

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

Query OK, 0 rows affected (0.00 sec)

mysql> quit

Bye

C:/mysql/bin>

3.Perl

安装 :

将ActiveState Perl 安装到 C:/Perl

安装 Modules(下面的重点推荐方法比较简易一些)

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

C:\>cd bugzilla

C:\ cd bugzilla >ppm

进入DOS命令行,输入ppm,或通过运行安装perl时创建的快捷方式,在开始 ActivePerl_5.1 程序Perl Package Manager 从而启动ppm(图形界面)来选择需要升级的包。

需要升级如下包:

AppConfig

TimeDate

DBI

DBD-mysql

Template-Toolkit

MailTools

GD

Chart

GDGraph

GDTextUtil

PatchReader

Net::LDAP

选中需要升级的包,右键点击,选择Install **** ,****是包名,最后点击下图中右侧红色框位置处的按钮或通过菜单File->Run Marked Actions 或者Ctrl + Enter,来触发升级命令。

如果没有找到可以安装或更新的包,或者没有你要想的包请将 http://ppm4.activestate测试数据/MSWin32-x64/5.14/1402/package.xml 添加到你的Perl Package Manager的库里,

添加的方法如下图:

步骤一:

步骤二:

Name随便写个有点意义的就可以了

Location就写 http://ppm4.activestate测试数据/MSWin32-x64/5.14/1402/package.xml

点Add,再点OK就添加上了

在这之前我看过前辈周怀进同志在2007年的文章,说有时候网络速度慢或不具备网络条件时,上面的在线安装方式就不爽了。

推荐的下载地址是 http://landfill.bugzilla.org/ppm/bugzilla-bundle.zip 不过我试过很多次都找不到网页,也许是很久以前的了吧,不过还是要

感谢他的文章给我了很大的帮助。

perl的安装目录下有lib和site/lib,lib里是perl自带的库,site/lib里是用户自己安装的包,在做下面 5配置 Bugzilla 时,如果提示某个 包的版本比较低,可以比较这

两个地方的文件版本,如果确实都低于最低要求,那去网上找最新的包文件,一般情况下可能是用户

自己安装的包的版本太低,只要删掉site/lib下的相关的文件即可。

这个细节很重要,很多文档都没有提到这个问题。

如果在checksetup.pl时候报如下错误:

Checking available perl DBD modules...

Invalid version format (non-numeric data) at Bugzilla/Install/Requirements.pm line 721.

如图:

本人的经验是将C:\bugzilla\Bugzilla\Install\Requirements.pm文件的一个判断给注释了,如下:

#if ($found and $found eq "-1") {
# $found_string = install_string('module_not_found');
#}

至于为什么因为暂时还没有时间研究,如果哪位找到了导致错误的真正原因请在本文添加评论或加我msn交流,谢谢

修改注册表

在注册表中创建

HKEY_CLASSES_ROOT/.cgi/Shell/ExecCGI/Command 编辑默认值为 C:/Perl/bin/perl.exe –T

4. Apache

  这里推荐使用 Apache 作为运行 Bugzilla 的 web 引擎。如果你想将 Bugzilla 运行在 IIS 上,可以参考: http://HdhCmsTestbugzilla.org/docs/2.18/html/configuration.html#http-iis

安装

默认安装即可,假设安装的路径是C:/Program Files/Apache Group它将安装在 C:/Program Files/Apache Group/Apache2。

如果你已经运行了IIS或oracle的http server,你在安装时配置apache运行在不同于80端口,否则你将不能访问。如果你的windows系统未安装IIS及其它http server选择默认安装即可。

允许Apache可写

创建如下目录:

? C:/Bugzilla/data

? C:/Program Files/Apache Group/Apache2/logs

? C:/Temp

配置httpd.conf文件

在记事本中编辑 C:/Program Files/Apache Group/Apache2/conf/httpd.conf

将httpd.conf和以下相应的内容比较,对照红色字体内容修改原有的内容。

#

# Listen: Allows you to bind Apache to specific IP addresses and/or

# ports, instead of the default. See also the

# directive.

#

# Change this to Listen on specific IP addresses as shown below to

# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)

#

#Listen 12.34.56.78:80

Listen 80

#

# 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 "C:/bugzilla"

#

# Each directory to which Apache has access can be configured with respect

# to which services and features are allowed and/or disabled in that

# directory (and its subdirectories).

#

# First, we configure the "default" to be a very restrictive set of

# features.

#

Options FollowSymLinks

AllowOverride None

#

# Note that from this point forward you must specifically allow

# particular features to be enabled - so if something's not working as

# you might expect, make sure that you have specifically enabled it

# below.

#

#

# This should be changed to whatever you set DocumentRoot to.

#

#

# AddHandler allows you to map certain file extensions to "handlers":

# actions unrelated to filetype. These can be either built into the server

# or added with the Action directive (see below)

#

# To use CGI scripts outside of ScriptAliased directories:

# (You will also need to add "ExecCGI" to the "Options" directive.)

#

AddHandler cgi-script .cgi

#

# Possible values for the Options directive are "None", "All",

# or any combination of:

# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews

#

# Note that "MultiViews" must be named *explicitly* --- "Options All"

# doesn't give it to you.

#

# The Options directive is both complicated and important. Please see

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

# for more information.

#

Options Indexes FollowSymLinks ExecCGI

#

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:

# Options FileInfo AuthConfig Limit

#

AllowOverride All

#

# Controls who can get stuff from this server.

#

Order allow,deny

Allow from all

#

# Tell Apache to use Perl to execute .cgi

#

ScriptInterpreterSource Registry-Strict

#You also should add index.cgi to the DirectoryIndex list.

#

# DirectoryIndex: sets the file that Apache will serve if a directory

# is requested.

#

# The index.html.var file (a type-map) is used to deliver content-

# negotiated documents. The MultiViews Option can be used for the

# same purpose, but it is much slower.

#

DirectoryIndex index.html index.html.var index.cgi

重新启动 Apache

1).在命令行中重新启动Apache

C:/>net stop apache2

The Apache2 service is stopping..

The Apache2 service was stopped successfully.

C:/>net start apache2

The Apache2 service is starting.

The Apache2 service was started successfully.

C:/>

2).通过Apache控制台重起apache服务,一般最小化在系统的右下角系统托盘处.

5 配置 Bugzilla

第一次执行checksetup.pl

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

以下信息可能会由于你的软件版本不同而不一致。

C:/>cd bugzilla

C:/bugzilla>perl checksetup.pl

Checking perl modules ...

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

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

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

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

Checking for DBI (v1.36) ok: found v1.52

Checking for DBD::mysql (v2.1010) ok: found v2.9004

Checking for File::Spec (v0.82) ok: found v3.12

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 v2005.082401

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

All the required modules are available at:

http://landfill.bugzilla.org/ppm/

You can add the repository with the following command:

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

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

#

# 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 (//)

#

$db_pass = 'bugs';

再次运行checksetup.pl

C:/bugzilla>perl checksetup.pl

这时将创建数据库相关表和初始化Bugzilla.下面蓝色字是创建过程中你要输入的。

….

创建过程中的日志这里就略去了 .

….

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: admin@test测试数据

You entered 'byron@example测试数据'. Is this correct? [Y/n] y

Enter the real name of the administrator: admin

Enter a password for the administrator account: 123456

Please retype the password to verify: 123456

'admin@test测试数据' is now set up as an administrator account.

C:/bugzilla>

现在就可以通过 http://localhost/ 登陆Bugzilla,至此你就能使用等待以久的Bugzilla缺陷跟踪系统了。下面是两个附加工作。

6 配置支持邮件发送

下载了上述 5 .邮件 fake , 参考里面的文档来配置即可,主要注意的事项是 usr 目录的位置,如果你的 bugzilla 装在 c 盘,则将 usr 目录放到 c:/ 下,如果装在 d 盘,则将 usr 目录放到 d:/ 下。

我在安装测试的过程中,用免费的那些 SMTP 服务器,如 smtp.126测试数据 ,我也设置了认证信息就是发不出去,以前我用 PHP 发送邮件,用 126 的 SMTP 还是可以发出去的,不确定是否和这个程序有关系。后来改用公司的 mail server 没有问题,是不需认证的。

另外配置成功后,能收到邮件后,邮件里面的一些信息需要修改,比如 urlbase , urlbase 默认是 http://you-havent-visited-editparams.cgi-yet/ 。

修改方法:

1). 你可以以管理员身份登陆,访问 http://****/editparams.cgi ,然后修改 urlbase ,“ **** ”表示是 bugzilla 所在的机器名或域名或 IP 地址。

2). 直接修改配置文件

修改 C:/bugzilla/data/params 文件,

查找 'urlbase' => 'http://you-havent-visited-editparams.cgi-yet/' ,将后面的字符串改为你所需要的。

7 汉化 Bugzilla

在 http://HdhCmsTestbugzilla.org/download/ 里能找到相应版本的bugzilla汉化包,按包内的文档去做就可以了。

汉化时的一些注意点,有些翻译的词汇不准确的话,你自己可以用 UltraEdit 等编辑器去批量查找到,自己去修改。比如在 2.18 中汉化包中,把 bug 信息中的 summary 译成注释,这就不准确了,摘要更为准确一些。自己去修改吧。

三 Bugzilla迁移

1 . Mysql/Bugzilla

把这两个软件目录直接拷贝到目标服务器,从简化工作的角度来说,你可以不要改变这两个软件的位置,原先在 C 盘,你还放在 C 盘,在 D 盘,你就放在 D 盘。

对于 Mysql ,你执行一下 C:/mysql/bin/winmysqladmin.exe,mysql 以后就作为服务而随系统启动自动加载了。

2.Perl/Apache

完全按照上面的安装配置文档,全新安装这两个软件,主要是那些 module 还需重新安装,当然第二次安装时,会熟练许多J。

3. 备份迁移 httpd.conf

将源服务器上的 C:/Program Files/Apache Software Foundation/Apache2.2/conf/ httpd.conf 备份,并拷贝至目标服务器 Apache 安装目录对应的位置中。

4. 备份迁移 sendmail.exe

直接拷贝对应的目录即可。将 /usr 目录拷贝到 bugzilla 安装目录所在驱动器上 .

随后启动相关服务,如 apache , mysql ,则迁移工作完成。

四 注意事项

如果你的机器装了 Oracle 10G , Oracle 则会创建一个环境变量 PERL5LIB, 指向了 Oracle 安装目录中 perl 相关目录,它的版本比较低,是 perl 5.8.3, 在安装配置 bugzilla 时,执行

perl checksetup会报错。你只需将该环境变量屏蔽即可。

A .参考文献

http://HdhCmsTestbugzilla.org/docs/win32install.html

http://bbs.51testing测试数据/viewthread.php?tid=22398 大概需要注册帐号才能下载,我参考的文档是一个朋友递过来的,但我还是根据文档中作者的信息到网上找到了这

个来源,以尊重作者的辛勤付出。 ( 《 Windows 下安装 Bugzilla 》作者 shorelew@hotmail测试数据 )

……

互联网

感谢开源软件的作者和团队!感谢共享相关知识的朋友!

B .未完成的事情 1.Linux 下安装 Bugzilla ,

据相关文档介绍比 windows 下简单,但我没有实践过。

2. 升级到 2.20,

文档显示,在 2.20 下不需要额外的 sendmail.exe 来支持发送邮件, 2.20 下及更高版本中已有模块,直接配置相关文件即可,可以到 bugzilla 官方网站去查找相关资料。

本文基于周怀进同志的文章加实际操作编写,希望对大家有帮助

原文作者联系方式 :

msn: zhj_michael@hotmail测试数据

blog: http://spaces.msn测试数据/members/zhj-michael/

查看更多关于win7+bugzilla+apache+mysql+activePerl的详细内容...

  阅读:45次