在 Windows上安装 Bugzilla
原作: Byron Jones 原文见:http://ww.bugzilla.org/docs/win32install.html
Bugzilla的2.18版是第一个不经任何修改就可以在Windows上运行的版本。本文档指导你逐步在Windows上安装Bugzilla(翻译文档时采用的是Bugzilla 2.22 稳定版,你至少应该使用2.18以上版本)。
请注意仍然有少数功能还不能在Windows上正常工作,其中最主要的就是接收邮件接口,请参考(contrib/README.Mailif)。
安装Bugzilla
有两个主要的途径获取Bugzilla 源代码 - 从CVS 获取或者使用 发布包。最好的途径是直接从CVS上获取,因为这种方式可以简单的使用CVS更新你的Bugzilla,即使你定制了你的Bugzilla安装。(如果你 对CVS不熟悉,或者你是第一次尝试安装,译者建议你还是使用发布包安装比较好,下载Bugzilla2.22 Stable Release)。
请在你继续之前阅读 Release Notes 。
使用CVS安装Bugzilla
首先从 http://www.cvsnt.org/下载CVS客户端。
接着运行安装程序,你只需要安装Command line client 和 Password Server (:pserver:) Protocol 就可以了。安装结束后注销然后重新登录使PATH环境变量的改变得到更新。
注意:本文档假定你想把Bugzilla安装到E:/Bugzilla(原文作者假定的默认安装区为C,译者不喜欢将比较重要的数据放在系统区,所以假定为E,以下同)。
打开命令行,然后改变目录到你要安装Bugzilla的上级目录。因为我们假定淡安装到 E:/Bugzilla,因此到E:/。
E:/>set CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
E:/>cvs login
Logging in to :pserver:anonymous@cvs-mirror.mozilla.org:2401:/cvsroot
CVS password: anonymous
E:/>cvs checkout -d Bugzilla -rBugzilla_Stable Bugzilla
cvs checkout: cwd=E:/ ,current=E:/
cvs checkout: Updating Bugzilla
U Bugzilla/.cvsignore
U Bugzilla/1x1.gif
U Bugzilla/Bugzilla.pm
U Bugzilla/CGI.pl
...
U Bugzilla/template/en/default/whine/multipart-mime.txt.tmpl
U Bugzilla/template/en/default/whine/schedule.html.tmpl
cvs checkout: Updating Bugzilla/template/en/extension
U Bugzilla/template/en/extension/filterexceptions.pl
cvs checkout: Updating Bugzilla/template/en/extension/hook
E:/>
使用CVS更新Bugzilla
如果你已经安装了Bugzilla的较早版本(从CVS或者安装包),更新使很简单的。即使你定制了Bugzilla,CVS也使足够智能来处理合并问题。如果CVS需要人为帮助进行合并,它会在报告的第一列显示“C”,你需要手工处理这些冲突。
E:/Bugzilla>cvs update -R -d -rBugzilla_Stable
cvs update: Updating .
P editusers.cgi
cvs update: Updating Bugzilla
P Bugzilla/Bug.pm
P Bugzilla/BugMail.pm
P Bugzilla/Chart.pm
P Bugzilla/Flag.pm
P Bugzilla/User.pm
P Bugzilla/Util.pm
cvs update: Updating Bugzilla/Auth
U Bugzilla/Auth/CGI.pm
cvs update: Updating Bugzilla/Template
cvs update: Updating Bugzilla/Template/Plugin
...
cvs update: Updating template/en/default/search
cvs update: Updating template/en/default/whine
cvs update: Updating template/en/extension
E:/Bugzilla>
从安装包安装Bugzilla
从http://bugzilla.org/download.html 下载Bugzilla安装包。
Bugzilla 发布的安装包使一个后缀为.tar.gz的压缩文件。.大多数Windows 压缩工具都能解压这种文件。
解压此包到你选择的安装目录,本文档中假定为E:/Bugzilla 。
更新用安装包安装的Bugzilla
如果你是使用安装包安装的Bugzilla,你也可以简单地使用从CVS来更新 CVS Upgrading 。
安装MySQL
下载MySQL
从 http://dev.mysql.com/downloads/mysql/ 下载MySQL 安装程序(对Bugzilla来说,"Windows Essentials"版就够用了,当然标准版也可以)。
安装
MySQL地安装程序是一个标准地Windows安装程序。使用默认地“典安装型”安装就可以了。在本文档中,假定将MySQL安装在E区,即E:/mysql 。
创建Bugs数据库和用户
使用 mysql 命令行工具创建 Bugzilla 数据库和MySQL的Bugzilla用户。
注意在下面的例子中 bugs 用户的密码为“sockmonkey”:
E:/mysql/bin>mysql --user=root -p mysql
Enter 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 'sockmonkey';
Query OK, 0 rows affected (0.03 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
E:/mysql/bin>
如果你运行的 MySQL 是 4.1 或者更高版本, 可能会被提示 Client does not support authentication protocol requested by server 错误信息。修正此问题的方法是,当你创建了用户之后,你必须使用 OLD_PASSWORD 重新设置用户密码。
E:/mysql/bin>mysql --user=root -p mysql
Enter 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('sockmonkey');
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
E:/mysql/bin>
安装ActiveState Perl
下载 ActiveState Perl 5.8.1 或更新版本
从 http://activestate.com/Products/Download/Download.plex?id=ActivePerl 下载ActiveState Perl 5.8.1 或者更新版本。
注意 Bugzilla 要求 ActiveState Perl 5.8.1 是因为它需要 CGI.pm 的 2.93 或更新版本。ActiveState Perl 5.8.0 带的是 CGI.pm 2.81,而 5.8.1 带的是 CGI.pm 3.00 。
在ActiveState Perl 5.8.6中的 Time::Local 1.10 有一个Bug,此 Bug 会引起在每个Bug列表的顶部都产生一些警告,所以避免使用此版本。
安装
ActiveState Perl 使用的也是标准的 Windows 安装,默认情况下,它将Perl 安装到 C:/Perl 。 不过,我们还是将Perl 安装到 E:/Perl (此为译者所加,原文采用的是默认安装)。
注意:如果你将Perl安装到一个包含了空格的目录中,Template-Toolkit将不能正常安装。
安装结束后注销然后重新登录使PATH环境变量的改变得到更新。
更新已有的安装
如果你已经安装了ActiveState Perl ,那么你现在只需要确保你使用的是最新版本的 ActiveState Perl 和最新版本的Perl模块就好了。
跟着下面链接中的指导即可更新ActiveState Perl: http://aspn.activestate.com/ASPN/docs/ActivePerl/install.html
要更新Perl模块,运行 ppm upgrade 。
创建临时目录
在 Windows 上,Perl 要定位一个正确的Windows目录来创建自己的临时文件(CGI.pm, File::Spec)会花相当场的时间,因此基本上它是使用一个给定目录列表而不是向Windows查询正确的(临时文件)目录。
为了避免这个问题,创建 C:/Temp 目录(此目录必须在C区上,不管你的Perl装在那里),而且要确保 SYSTEM 用户具有写入和修改存取权限。
安装Perl模块
Bugzilla需要安装若干Perl模块来支持,这些模块大多数可以在http://landfill.bugzilla.org/ppm/找到。
如果你使用了代理服务器或者防火墙,也许你会在运行PPM时遇到问题,去 ActivePerl FAQ找解决办法。
Net::LDAP 模块只有你使用Active Directory for authentication时才需要安装。
注意:运行PPM安装模块可能需要使用CVS,所以你最好照前面的办法安装CVS。
如果某些必需的模块没有安装成功,在最后检查的时候会提示相关信息。下面的安装提示所提示的版本信息可能与你的提示不同是没有关系的,因为你安装的时候版本可能已经更新了。
E:/>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
ppm> install AppConfig
====================
Install 'AppConfig' version 1.52 in ActivePerl 5.8.7.813.
====================
Downloaded 50508 bytes.
...
Successfully installed AppConfig version 1.52 in ActivePerl 5.8.7.813.
ppm> install TimeDate
====================
Install 'TimeDate' version 1.16 in ActivePerl 5.8.7.813.
====================
Downloaded 19235 bytes.
...
Successfully installed TimeDate version 1.16 in ActivePerl 5.8.7.813.
ppm> install DBI
====================
Install 'DBI' version 1.43 in ActivePerl 5.8.7.813.
====================
Downloaded 508164 bytes.
...
Successfully installed DBI version 1.43 in ActivePerl 5.8.7.813.
ppm> install DBD-mysql
====================
Install 'DBD-mysql' version 2.9002 in ActivePerl 5.8.7.813.
====================
Downloaded 178803 bytes.
...
Successfully installed DBD-mysql version 2.9002 in ActivePerl 5.8.7.813.
ppm> install Template-Toolkit
====================
Install 'Template-Toolkit' version 2.13 in ActivePerl 5.8.7.813.
====================
Downloaded 530770 bytes.
...
Successfully installed Template-Toolkit version 2.13 in ActivePerl 5.8.7.813.
ppm> install MailTools
====================
Install 'MailTools' version 1.67 in ActivePerl 5.8.7.813.
====================
Downloaded 46881 bytes.
...
Successfully installed MailTools version 1.67 in ActivePerl 5.8.7.813.
ppm> install GD
====================
Install 'GD' version 2.07 in ActivePerl 5.8.7.813.
====================
Downloaded 363039 bytes.
...
Successfully installed GD version 2.07 in ActivePerl 5.8.7.813.
ppm> install Chart
====================
Install 'Chart' version 2.3 in ActivePerl 5.8.7.813.
====================
Downloaded 58641 bytes.
...
Successfully installed Chart version 2.3 in ActivePerl 5.8.7.813.
ppm> install GDGraph
====================
Install 'GDTextUtil' version 0.86 in ActivePerl 5.8.7.813.
====================
Downloaded 19178 bytes.
...
Successfully installed GDTextUtil version 0.86 in ActivePerl 5.8.7.813.
====================
Install 'GDGraph' version 1.43 in ActivePerl 5.8.7.813.
====================
Downloaded 71764 bytes.
...
Successfully installed GDGraph version 1.43 in ActivePerl 5.8.7.813.
ppm> install PatchReader
====================
Install 'PatchReader' version 0.9.4 in ActivePerl 5.8.7.813.
====================
Downloaded 9558 bytes.
...
Successfully installed PatchReader version 0.9.4 in ActivePerl 5.8.7.813.
ppm> install Net::LDAP
====================
Install 'Convert-ASN1' version 0.19 in ActivePerl 5.8.7.813.
====================
Downloaded 26326 bytes.
...
Successfully installed Convert-ASN1 version 0.19 in ActivePerl 5.8.7.813.
====================
Install 'perl-ldap' version 0.33 in ActivePerl 5.8.7.813.
====================
Downloaded 188548 bytes.
...
Successfully installed perl-ldap version 0.33 in ActivePerl 5.8.7.813.
====================
Install 'Net-LDAP-Express' version 0.11 in ActivePerl 5.8.7.813.
====================
Downloaded 7693 bytes.
...
Successfully installed Net-LDAP-Express version 0.11 in ActivePerl 5.8.7.813.
ppm>
PatchReader 问题
确保你安装了 PatchReader 0.9.4 或更新版本。如果你已经安装了一个较旧的版本,那么卸载此ppm然后从 http://landfill.bugzilla.org/ppm/PatchReader.ppd安装新版本,方法一样(此问题目前已经不存在):
ppm> uninstall PatchReader
====================
Remove 'PatchReader' version 0.9.2 from ActivePerl 5.8.7.813.
====================
...
Successfully removed PatchReader version 0.9.2 from ActivePerl 5.8.7.813.
ppm> install http://landfill.bugzilla.org/ppm/PatchReader.ppd
====================
Install 'PatchReader' version 0.9.4 in ActivePerl 5.8.7.813.
====================
Downloaded 9558 bytes.
...
Successfully installed PatchReader version 0.9.4 in ActivePerl 5.8.7.813.
ppm>
安装Apache
建议你在Apache Web Server 平台上运行Bugzilla 。如果你要在 IIS上运行Bugzilla,请参看Bugzilla文档中的配置指导。I
下载
从 http://httpd.apache.org/download.cgi下载Apache 2.x 的最新版本。
安装
Apache 也是采用标准的Windows安装包。跟着提示逐步安装就可以了,只要你确保你的安装是所有用户都可用的。注意Apache总是将自己安装在你所指定目录的Apach2子目录中,默认的目录是 C:/Program Files/Apache Group 所以Apache将被安装在 C:/Program Files/Apache Group/Apache2 。
在本文档中,我假定指定目录 E:/ ,所以 Apache 的目录就是 E:/Apache2 。
如果你已经在运行了IIS,也就是说你占用了80端口,那么必须配置Apache运行在80以外的端口。不过,安装程过程并不要求监听端口,先选择 All Users (即使用80端口),后面(在安装完成后)再修改。
默认情况下,Apache 是以SYSTEM 用户运行的。出于安全的原因,应该重新配置使其以一个特定的Apache 用户来运行比较好:创建一个不属于任何组的用户,然后配置Apache服务以此用户的身份运行。
给予Apache用户权限
Apache 默认使以 SYSTEM 用户运行的,Apache用户需要以下目录及其子目录的写入和修改权限。不同的Windows版本可能有不同的策略,也许你使用的Windows的版本已经给予了这些权限。
- E:/Bugzilla/data
- E:/Apache2/logs
- C:/Temp
其中 E:/Bugzilla/data 目录是你第一次运行 checksetup.pl 后创建的(后面就明白了)。
配置端口和文档根路径( DocumentRoot )
使用你偏好的编辑器编辑 E:/Apache2/conf/httpd.conf 配置文件 (链接所指是Vim编译器)。
要修改Apache运行(或叫监听,绑定)的端口,编辑 Listen 选项:
#
# 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 使其指向Bugzilla目录,即 E:/Bugzilla 。请注意这里要修改 httpd.conf 的两个位置,而且你需要使用 / 而不是 / 做为目录分割符。
#
# 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 "E:/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 "E:/Bugzilla">
配置 CGI
要使 Apache 支持CGI ,你需要启动 CGI 处理,去掉 AddHandler cgi-script .cgi 行的注释符号就可以了。
#
# 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
接着,添加 ExecCGI 允许Bugzilla目录的 .cgi 脚本执行。我们还需要允许 Bugzilla 的 .htaccess 文件可以限制对敏感性文档的访问,即允许它覆盖默认设置,把 AllowOverride None 改为 AllowOverride All 就可以了。
另外,Apache 还需要知道使用 Perl 来执行 .cgi 文件,通过增加 ScriptInterpreterSource 段来实现。(即根据注册表的设置来调用相应程序)
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "E:/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>
其次,还需要将 index.cgi 添加到 DirectoryIndex (目录索引)列表,使其也可以做为目录默认调用的文档。
#
# 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 正常工作,你需要在注册表添加使用 Perl 执行 .cgi 文件的入口:
建一个键 HKEY_CLASSES_ROOT/.cgi/Shell/ExecCGI/Command ,它的默认值是 perl.exe 的完整路径加一个 -T 参数 E:/Perl/bin/perl.exe -T 。
禁止日志记录
除非你要保留对你的 Bugzilla 安装点击数的统计,那么最好是禁止日志记录,这只需要将 CustomLog 行注释即可。
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
#CustomLog logs/access.log common
重启Apache
最后,重启 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:/>
其他
Bugzilla 内键了对 SMTP 服务器的支持,但是它还不支持 SMTP 认证或者调试 SMTP 错误。
如果你需要 SMTP 认证(包括POP before SMTP方式),你可以使用 Glob's sendmail wrapper 。 下载按照说明一步一步安装。
如果你使用了Sendmail 的日志,你需要确保Apache 对 E:/usr/lib 有写权限。
安装正确之后,在bugzilla的Parameters 中 EMail 的 mail_delivery_method 选为sendmail然后保存。
配置Bugzilla
运行checksetup.pl
运行 checksetup.pl 来检查必要的 Perl 模块是否已经安装,如果通过,则生成 localconfig 文件。 (如果存在问题,请仔细阅读提示)
E:/>cd bugzilla
E:/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
E:/bugzilla>
编辑localconfig
打开 E:/Bugzilla/localconfig 编辑它来配置 Bugzilla 。
你必须告诉 Bugzilla 怎样存取你的数据库。如果你用的是 bugs/bugs , 你只需要设置 db_pass 即可。
#
# 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 = 'sockmonkey';
再次运行checksetup.pl
这一次,它将构建你的 bugs 数据库的所有数据表,而且初始化 Bugzilla 。
E:/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 ...
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 ...
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.
E:/bugzilla>
设置参数
现在,你现在已经可以使用 checksetup.pl 创建的用户登录 Bugzilla 了。使用你的浏览器打开 http://localhost/,选择 Log in to an existin account登录。
在网页的下面(页脚),选择 Parameters 来设置 Bugzilla 的参数。
将你的电子邮件地址填入maintainer 输入框中。
将 Bugzilla 的URL填到 urlbase 域中,这个将被用在电子邮件中,所以不要填"localhost"。
从 http://www.graphviz.org/Download_windows.php 下载并安装 WebDot ,将 dot.exe 的完整路径填入webdotbase 域中。
* A complete file path to 'dot' (part of GraphViz) will generate the graphs locally.
* A URL prefix pointing to an installation of the webdot package will generate the graphs remotely.
* A blank value will disable dependency graphing.
The default value is a publically-accessible webdot server. If you change this value, make certain that the webdot server can read files from your webdot directory. On Apache you do this by editing the .htaccess file, for other systems the needed measures may vary. You can run checksetup.pl to recreate the .htaccess file if it has been lost.
使用计划任务
collectstats.pl
增加一个计划任务使其每天(每夜)运行 collectstats.pl 。在Windows XP 按如下步骤做:
- 控制面板 --> 计划任务 --> 添加计划任务
- 下一步
- 浏览
- 找到 perl.exe ( E:/Perl/bin/perl.exe )
- 命名计划任务,例如"Bugzilla Collect Stats"
- 使此任务按照你所期望的时间每天执行
- 如果你的 Apache 不是以 SYSTEM 而是以其他用户运行的,在这里填入那个用户。另外,你也可以创建个一个用户,他对Bugzilla目录有写权限,然后使用这个用户
- 选取 "打开高级属性..." 并点击完成
- 将脚本的名字附加到“运行”域的后面,即 E:/Perl/bin/perl.exe E:/Bugzilla/collectstats.pl
- 将“起始目录”设为 Bugzilla 的目录
whineatnews.pl
增加执行 whineatnews.pl 的计划任务,步骤同上。
whine.pl
增加执行 whine.pl 的计划任务,步骤基本上和上面一样。除过 whine.pl 需要e 运行在 Perld 的 Taint 模式,也就使说命令行需要增加 -T 参数,即:
E:/Perl/bin/perl.exe -T E:/Bugzilla/whine.pl
备份 Bugzilla
首先,你可以备份整个 Bugzilla 目录,它很小,这样你可以将你所有设置和定制信息备份到你的备份介质上。
当然,最重要的需要备份 Bugzilla 数据还是 Bugzilla 数据库。它里面包含了你所有的Bug,用户,附件等几乎所有数据。跟大多数数据库一样,对MySql数据库的备份就生成数据库的一个转储(dump)。
可以按计划运行 mysqldump 工具创建转储,并将结果文件加入你的备份介质。你可以在 http://dev.mysql.com/doc/mysql/en/mysqldump.html 找到 mysqldump 工具的帮助文档。