网站首页 - 关于我们 - 团队成员 - 联系我们

 rss
♀ 您现在的位置在:首页 -> CNFUG期刊 -> 正文(阅读
Bugzilla ON FreeBSD 4.9 HOWTO

tonnyom < tonnyom@hotmail.com >

版权声明:可以任意转载,转载时请务必以文字形式标明文章原始出处和作者信息及本声明.

前言
Bugzilla作为一个产品缺陷的记录及跟踪工具,它能够为你建立一个完善的Bug跟踪体系,包括报告Bug、查询Bug记录并产生报表、处理解决、管理员系统初始化和设置四部分.主要特点为:
  1. 基于Web方式,安装简单、运行方便快捷、管理安全。
  2. 有利于缺陷的清楚传达。本系统使用数据库进行管理,提供全面详尽的报告输入项,产生标准化的Bug报告。
  3. 系统灵活,强大的可配置能力。
  4. 自动发送Email,通知相关人员。根据设定的不同责任人,自动发送最新的动态信息,有效的帮助测试人员和开发人员进行沟通。

由于目前网上资料要么是在Linux及Windows 系统下,要么属于Source Code安装,故才有此篇文档.该文档仅为 Bugailla On FreeBSD 的安装文档,并没有涉及到具体开发人员的使用操作,如果可能的话,将在今后继续更新此文档,如果你在安装中有什么问题,可以Mail 我,我将尽我能力来回复.

软件及平台
FreeBSD 4.9 //为了充分体现FreeBSD的价值,主要软件安装均为PORTS安装

apache_1.3.28
mod_ssl-2.8.15-1.3.28
mysql 3.23.58
bugzilla 2.16.3
bugzilla-2.16.1-cn-0.91.tar.gz

目的
建立一套程序缺陷记录及跟踪系统,用于程序开发人员对程序BUG进行记录,分析,跟踪.


Apache安装及配置

#cd /usr/ports/www/apache13-modssl
#make install clean
#vi /usr/local/etc/apache/httpd.conf //修改ScriptAlias 的cgi-bin 参数,以及.cgi format的AddHandler
ScriptAlias /cgi-bin/ "/usr/local/www/data/bugzilla/"

#
# "/usr/local/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#

AllowOverride None
Options ExecCGI //此处切记要打开 ExecCGI 参数
Order allow,deny
Allow from all

#AddHandler cgi-script .cgi

MySQL安装及配置
#cd /usr/ports/databases/mysql323-server #make install clean #/usr/local/etc/rc.d/mysql-server.sh start #mysql -uroot -p

>GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES ON bugtrack.* TO buguser@localhost IDENTIFIED BY '123456'; //添加建立Bugzilla Database的用户及权限
>FLUSH PRIVILEGES;

Bugzilla安装及配置
#cd /usr/ports/devel/bugzilla/ #make WITH_BUG_EXPORT_AND_IMPORT=y WITH_BUG_MAILING_MODULES=y install clean //支持以XML格式导入或导出BUG DATABASES,支持PERL MAIL MODULE.

注:
WITH_BUG_MAILING_MODULES install perl modules required for bug mailing support (contrib/bug_email.pl) interface
WITH_BUG_EXPORT_AND_IMPORT install perl modules required for bug export/import feature to move bugs to or from other bugzilla installations

#cd /usr/local/www/data-dist/bugzilla
#./checksetup.pl //第一次运行checksetup.pl,生成localconfig文件
#vi localconfig //修改localconfig,文件中的MySQL参数

#
# How to access the SQL database:
#
$db_host = "localhost"; # where is the database?
$db_port = 3306; # which port to use
$db_name = "bugtrack"; # name of the MySQL database
$db_user = "buguser"; # 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 = '123456';


#cd /usr/local/www/data-dist/bugzilla
#./checksetup.pl //再次运行checksetup.pl,检查Bugzilla 的安装配置,以及导入Bugailla所需数据库.

Checking perl modules ...
Checking for AppConfig (v1.52) ok: found v1.55
Checking for CGI::Carp (any) ok: found v1.13
Checking for Data::Dumper (any) ok: found v2.101
Checking for Date::Parse (any) ok: found v2.27
Checking for DBI (v1.13) ok: found v1.37
Checking for DBD::mysql (v1.2209) ok: found v2.0419
Checking for File::Spec (v0.82) ok: found v0.82
Checking for File::Temp (any) ok: found v0.12
Checking for Template (v2.07) ok: found v2.08
Checking for Text::Wrap (v2001.0131) ok: found v2001.0929
Checking for CGI::Carp (any) ok: found v1.13

The following Perl modules are optional:
Checking for GD (v1.19) ok: found v2.07
Checking for Chart::Base (v0.99) ok: found v2.2
Checking for XML::Parser (any) ok: found v2.34

Checking user setup ...
Creating data directory ...
Creating graphs directory...
Creating index.html...
Removing existing compiled templates ...
Precompiling templates ...
Checking for MySQL Server (v3.22.5) ok: found v3.23.58
Creating database bugtrack ...

Creating table groups ...
Creating table longdescs ...
Creating table milestones ...
Creating table namedqueries ...
Creating table profiles ...
Creating table fielddefs ...
Creating table logincookies ...
Creating table components ...
Creating table cc ...
Creating table keyworddefs ...
Creating table dependencies ...
Creating table shadowlog ...
Creating table duplicates ...
Creating table profiles_activity ...
Creating table votes ...
Creating table attachstatuses ...
Creating table bugs ...
Creating table tokens ...
Creating table products ...
Creating table watch ...
Creating table keywords ...
Creating table versions ...
Creating table attachstatusdefs ...
Creating table attachments ...
Creating table bugs_activity ...
Adding group tweakparams ...
Adding group editusers ...
Adding group creategroups ...
Adding group editcomponents ...
Adding group editkeywords ...
Adding group editbugs ...
Adding group canconfirm ...

Looks like we don't have an administrator set up yet. Either this is your
first time using Bugzilla, or your administrator's privs might have accidently
gotten deleted at some point.
Enter the e-mail address of the administrator: tonnyomAThotmail.com //输入login email
You entered 'tonnyomAThotmail.com'. Is this correct? [Y/n] Y
Enter the real name of the administrator: lele
Enter a password for the administrator account: //输入login password
Please retype the password to verify:
'tonnyomAThotmail.com' is now set up as the administrator account.
Creating initial dummy product 'TestProduct' ...
Populating duplicates table...
Creating duplicates directory...
Reminder: Bugzilla now requires version 8.7 or later of sendmail. //end


#cd /usr/local/www
#chown www:nogroup data-dist

#cd /usr/local/www/data-dist
#chown www:nogroup bugzilla

Bugzilla汉化
#cd ~/appz/ #fetch http://optusnet.dl.sourceforge.net/sourceforge/bugzilla-cn/bugzilla-2.16.1-cn-0.91.tar.gz #tar zxvf bugzilla-2.16.1-cn-0.91.tar.gz
注: 该版本,汉化效果不是很好,在其网站中,还有更新的版本,大家可以去自己尝试一下那个版本更好.
#cd /usr/local/www/data-dist/bugzilla/template #cp -Rpf ~/appz/template/cn ./ #vi /usr/local/www/data-dist/bugzilla/globals.pl //修改INCLUDE_PATH为汉化文件路径

INCLUDE_PATH => "template/en/custom:template/en/default" ,
==> INCLUDE_PATH => "template/cn/custom:template/cn/default" ,

#cd /usr/local/www/data-dist/bugzilla
#fetch http://www.bugzilla.org/img/bugzilla.jpg ; mv bugzilla.jpg bug.jpg
#cp ant.jpg ant1.jpg

#cd /usr/local/www/data-dist/bugzilla
#find ./ -type d -exec chown www:nogroup {} \; //设置web server属主对该目录下所有目录的权限
#find ./ -type f -exec chown www:nogroup {} \; //设置web server属主对该目录下所有文件的权限

测试
/usr/local/etc/rc.d/apache.sh start


IE登录:
http://freebsd4.9-ip/bugzilla/index.cgi

Login Name: tonnyomAThotmail.com
Login Password: 123456

参考
http://www.cpan.org CPAN Module

http://www.bugzilla.org/docs/2.16/txt/Bugzilla-Guide.txt Bugzilla Guide

http://prdownloads.sourceforge.net/bugzilla-cn/ Bugzilla-CN Tool

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ FreeBSD Handbook

http://www.uml.org.cn/Test/test19.htm 测试跟踪工具Bugzilla介绍

http://www.douzhe.com/docs/linux/1672.html 关于BUGZILLA的说明和安装

2004年8月24日 12:36


版本修订0.1

1,如何利用系统自带sendmail来发信件?
#vi /etc/rc.conf //编辑rc.conf文件

sendmail_enable="YES"
#cd /usr/lib //Bugziila默认调用sendmail的路径为 /usr/lib #ln -s /usr/sbin/sendmail sendmail #tail /var/log/maillog //查看以下LOG,可以检查信件已经正常发出

Aug 27 12:11:31 freebsd5 sendmail[406]: i7RCBJTu000406: from=www, size=277, class=0, nrcpts=1, msgid=<200408271211.i7RCBJTu000406@freebsd5.com>, relay=www@localhost
Aug 27 12:13:05 freebsd5 sm-mta[408]: i7RCBVeQ000408: from=, size=525, class=0, nrcpts=1, msgid=<200408271211.i7RCBJTu000406@freebsd5.com>, proto=ESMTP, daemon=MTA, relay=localhost.com [127.0.0.1]
Aug 27 12:13:05 freebsd5 sendmail[406]: i7RCBJTu000406: to=tonnyomAThotmail.com, ctladdr=www (80/80), delay=00:01:46, xdelay=00:01:34, mailer=relay, pri=30078, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (i7RCBVeQ000408 Message accepted for delivery)
Aug 27 12:18:17 freebsd5 sm-mta[411]: i7RCBVeQ000408: timeout waiting for input from mx1.hotmail.com. during client greeting
Aug 27 12:18:26 freebsd5 sm-mta[411]: i7RCBVeQ000408: to=, ctladdr= (80/80), delay=00:05:22, xdelay=00:05:21, mailer=esmtp, pri=30326, relay=mx1.hotmail.com. [64.4.50.99], dsn=2.0.0, stat=Sent (OK 1093580390)

网友评论  以下本论与CNFUG(China FreeBSD User Group)立场无关
网友:wbm 发表时间:2005年04月11日

我想问一下,bugzilla我已经安装上了怎么设置用户的权限。我出现的问题是我不给他任何权限此用户还是有所有的权限,这是什么原因呢?望指教,谢谢!

网友:Army 发表时间:2005年04月25日

文中,使用的是apache1,mod_perl1,mysql3;若使用FreeBSD 5-X/apache2则需要作出以下修正。

1:port安装/usr/ports/www/apache2/ ,/usr/ports/www/mod_perl2;/usr/ports/database/mysql40-server;

2:编辑/usr/local/etc/apache2/httpd.conf
比原先多加入以下俩行:
#enable mod_perl built as DSO,by adding to httpd.conf:
LoadModule perl_module libexec/apache2/mod_perl.so
#Next,tell Perl where to find mod_perl2 libraries:
PerlModule Apache2

3:编辑/etc/rc.conf文件;
加入如下两行:
apache2_enable="YES"
mysql_enable="YES"

4:BUGZILLA扩展:
bugzilla自身功能有限,现在sourceforge上有很多针对bugzilla的补丁/扩展;
如:自动生成测试报告用例之类的testzilla:http://sourceforge.net/projects/tzilla/

网友:Spawn 发表时间:2005年05月24日

我在win32上安装的bugzilla,还算是比较顺利,完成了BUGZILLA要求的必须的模块的安装然后修改了localconfig文件。接下来运行perl checksetup.pl在系统的提示下创建了Administrator的相关邮件(用户登陆名)、Realname、登陆密码等资料。然后再次运行 perl checksetup.pl时系统显示:
Checking perl modules ...
Checking for AppConfig (v1.52) ok: found v1.56
Checking for CGI::Carp (any) ok: found v1.27
Checking for Data::Dumper (any) ok: found v2.12
Checking for Date::Parse (any) ok: found v2.27
Checking for DBI (v1.13) ok: found v1.39
Checking for DBD::mysql (v1.2209) ok: found v2.9002
Checking for File::Spec (v0.82) ok: found v0.83
Checking for File::Temp (any) ok: found v0.13
Checking for Template (v2.07) ok: found v2.13
Checking for Text::Wrap (v2001.0131) ok: found v2001.0929
Checking for CGI::Carp (any) ok: found v1.27

The following Perl modules are optional:
Checking for GD (v1.19) not found
Checking for Chart::Base (v0.99) ok: found v2.3
Checking for XML::Parser (any) ok: found v2.31

If you you want to see graphical bug dependency charts, you may install
the optional libgd and the Perl modules GD-1.19 and Chart::Base-0.99b, e.g. by
running (as root)
Checking user setup...
Removing existing compiled templates...
Precompiling templates...
Checking for MySql Serverok:found v4.1.11-nt
Populating duplicates table...
D:\Bugzilla>
然后就不能继续了,不知道是什么原因啊?好象正常情况是应该提示设置SENDMAIL了吧?麻烦您帮我分析一下啊,再次感谢了!!

网友:wang 发表时间:2005年06月26日

能否介绍一下如何设置sendmail的,我安装后有些邮件无法正常使用,申请新用户时密码接收不到。还有,如果是2.18版本是否也可以这样汉化呢

网友:paper 发表时间:2005年12月12日

我也是刚装的,BUGZILLA的主页可以进了,如果不配置邮件会有什么结果啊?

我也说几句




推荐给好友

  


文章下载

本功能正在开发中,目前不能使用,敬请原谅。

√ 期刊在线投稿: /journal/contribute.html

√ 本文打印于《CNFUG期刊》,欢迎访问 http://www.cnfug.net 获取更多技术文章。