Win7系统搭建4.4.6—Bugzilla平台

Win7系统搭建4.4.6—Bugzilla平台

     前段时间团队开发需要搭建一个bug管理工具,网上找了些资料发现有Easybug、FreeBug、Bugzilla等,我主要尝试了这三个平台。Easybug有收费和免费版,由于不能再本地服务器上搭建,所以没用;FreeBug现在改为了禅道项目管理工具,个人觉得非常好用,国内开源平台,安装便捷,使用简单。最后是Bugzilla,也是一款开源的软件,由于在搭建过程中遇到N多问题最终搭建成功所以记录下过程。
搭建环境及工具:Win7+ActivePer_5.16.2+Apache2.2.25+Bugzilla-4.4.6+MySql5.1.62
Bugzilla:
下载Bugzilla4.4.6,将其放到C盘根目录C:/bugzilla即可
MySql
下载安装Mysql,用mysql命令为bugzilla创建一个数据库,命令如下

create database bugs;                   创建一个数据库bugs

create user bugs@localhost;              创建一个用户bugs

grant all on bugs.* to bugs@'localhost';     为用户bugs授权

flush privileges;                         刷新用户权限

ActivePerl:

下载ActivePerl,默认安装,这里遇到的问题是安装perl模块,安装perl模块使用命令ppm install xxx(必须联网);如果使用代理服务器或者启用防火墙,使用ppm将出现问题;如果安装不上,安装进度条不动了,可以换其他版本。

安装好后,在命令行运行C:\>ppm upgrade --install;     接着分别运行命令: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-Express;

Apache:

默认安装Apache,编辑C:\Program Files\Apache Grounp\Apache2\conf\httpd.conf,如果用NodePad等编辑工具编辑完后保持,弹出用另一程序占用不能保存,可以退出,使用管理员用户重新开启NodePad在保存;需要编辑的内容如下:

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# 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.  
#
<Directory />
   Options FollowSymLinks
   AllowOverride None
</Directory>

#
# 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.
#
<Directory "C:/Bugzilla">
# 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
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/Bugzilla">

#
# 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

</Directory>
#
# 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
为了使 ScriptInterpreterSource Registry-Strict 能够工作,还需要在注册表中增加一条信息:

创建一个Key值:HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command,在HKEY_CLASSES_ROOT下创建新项.cgi等,注意这些拼写不能出错,将Perl.exe的完整安装路径加上一个-T参数作为Command的默认值,如:C:\Perl\bin\perl.exe -T,这样apacheWeb服务器就配置好了,配置好后需要重新启动Apache。

配置Bugzilla:

在命令行中转到bugzilla目录下C:\bugzilla运行命令checksetup.pl;C:\bugzilla>checksetup.pl

可以看到还有好多perl模块没有安装,将所有命令运行一遍,没有就跳过,一些模块有依赖性,必须先装完后面的前面的才能装,运行一遍后,再装前面的最后剩下几个实在装不了也没关系,最重要的是必须安装所有必选项。

我的这些模块没装上;之后在bugzilla目录下会生成一个localconfig文件,编辑该文件,修改参数:db_port  = 3306,index_html =1;修改之后保存再次运行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: byron@example.com    必须是一个可用的邮箱地址
You entered 'byron@example.com'.  Is this correct? [Y/n] y
Enter the real name of the administrator: Byron Jones        随便

Enter a password for the administrator account: beef          随便

Please retype the password to verify: beef

'byron@example.com' is now set up as an administrator account.

这样bugzilla基本就安装完成了,打开浏览器输入http://localhost;便可以看到bugzilla的主页面了。之后还需要做一些设置,用checksetup时设置的用户名和密码登入后,去parameters页面设置url_base,设置http://本机IP:80/,别忘了结尾的/符号。

为了可以发送Email,还需要设置smtp服务器,用户名、密码,这里的问题最多;

我使用的是内部邮箱服务器,可以用,但是只能内部之间发送邮件。


这是网上搜到的一个案例

There was an error sending mail from 'bugzilla-daemon@' to '123@163.com': Can't call method "address" on an undefined value at C:/Perl/site/lib/Email/Send/SMTP.pm line 25.

Email::MIME::CreatorBUGZILLA里自带的有SMTP,只要SMTP能够通过认证就可以了,所以第三方,以及代码什么都不用修改,只要设置params里面的参数就可以了!
在..\data\params设置如下参数:
maintainer :                  123@163.com
mail_delivery_method :         SMTP
mailfrom :                     123@163.com
sendmailnow:                   on
smtpserver :                   smtp.163.com
smtp_username:                 123@163.com
smtp_password :                **********
注意:maintainer、mailfrom必须相同!smtp_username邮箱必须是存在的真实的邮箱,smtp_password必须是你真实邮箱的真实密码(要与你所登陆邮箱时的密码相同)!邮件已经发送成功!如果还有不能连接等问题,只能说明你的邮箱和密码有问题!









  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值