如何搭建Bugzilla

今天由于工作需要搭建了一个Bugzilla.

Bugzilla是软件测试的利器,是一款优秀的开源的Bug Tracking System;由于是专门为Unix定制开发的,因此要想在Windows平台下安装,需要费不少的劲;不晓得是什么原因,网上有关Bugzilla的安装讲解大多都是支离破碎的,再加上它本身就是一种可以任意修改的Perl脚本程序,而且Bugzilla开发小组在代码维护和发布上也可能有点小问题;这些因素造成要想在Windows平台下搭建一个相对完整的Bugzilla系统,更是难上加难;不过,如果有一定的Perl语言知识的话,改动起来还是比较快的。

Download and Install

一安装Mysql
1.   本文使用的是最新Mysql For Windows的4.0.17版本,没有出现问题,这是官方下载连接:http://www.mysql.com/get/Downloads/MySQL-4.0/mysql-4.0.17-win.zip

2.   安装时需要注意最好不要改动Mysql的默认安装位置,否则,无法引导,需要改动一些设置。这里假设你的安装位置为:D:/mysql

3.   安装完毕后进入D:/mysql/bin,执行winmysqladmin.exe,如果出现绿灯,则说明你的Mysql系统正常启动了。

4.   下载Mysql Center Control版本,这是一个Mysql的管理器,可以直接修改数据库内容,非常方便。下载连接:http://ftp.tku.edu.tw/mysql/Downloads/MySQLCC/mysqlcc-0.9.3-win32.zip

5.   修改mysql的root用户密码:

D:/>cd mysql

D:/mysql>cd bin

D:/mysql/bin>mysql -u root mysql

mysql>UPDATE user SET Password=PASSWORD('<new_password'>) WHERE user='root';

mysql>FLUSH PRIVILEGES;

说明:其中<new_password>为root用户的新密码。更改密码后,要用root用户访问mysql,必须使用mysql -u root -p,按提示敲入正确的root新密码。

6.   创建bugs用户,并赋给相应的权限:

   mysql>GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, DROP, REFERENCES, LOCK TABLES, CREATE TEMPORARY TABLES ON bugs.* TO bugs@localhost IDENTIFIED BY '<bugs_password>';

mysql> FLUSH PRIVILEGES;

说明:要记住bugs用户的密码,在下面的bugzilla配置文件要用。

7.   创建bugs数据库:

mysql>create database bugs;

mysql>exit

 

 


二安装ActiveState Perl

Download the ActivePerl 5.8.1 or higher MSI from https://www.activestate.com/activeperl/downloads/, latest release 5.10.1.1006 is recommended.

ActivePerl uses a standard Windows Installer. Install, sticking with the defaults, which will install Perl into C:/Perl.

Once the installation has completed, log out and log in again to pick up the changes to the PATH.

Create Temp Directory
Create the C:/Temp directory (it has to be on drive C) and ensure SYSTEM has write and modify access.

Install Modules
Bugzilla requires a number of perl modules to be installed. The following are the commands and ouput for a 5.10.1.1006 perl module installation:

C:/>ppm upgrade
Downloading ActiveState Package Repository packlist...done
Updating ActiveState Package Repository database...done
Syncing site PPM database with .packlists...done
Archive-Extract 0.36 (have 0.34)
Archive-Tar 1.54 (have 1.52-r1)
Attribute-Handlers 0.87 (have 0.86)
AutoLoader 5.70 (have 5.69)
Bit-Vector 7.1 (have 6.9)
CPANPLUS-Dist-Build 0.44 (have 0.36)
Carp-Clan 6.04 (have 6.00)
Class-Accessor 0.34 (have 0.33)
Class-ISA 0.36 (have 0.33)
Compress-Raw-Bzip2 2.023 (have 2.020)
Compress-Raw-Zlib 2.023 (have 2.020)
DBD-ODBC 1.23 (have 1.22)
DBD-SQLite 1.27 (have 1.25)
DBI 1.609 (have 1.607)
Date-Calc 6.3 (have 5.6)
Encode 2.39 (have 2.35)
ExtUtils-CBuilder 0.27 (have 0.2603)
ExtUtils-MakeMaker 6.56 (have 6.55_02)
ExtUtils-Manifest 1.58 (have 1.56)
ExtUtils-ParseXS 2.21 (have 2.2002)
File-Fetch 0.22 (have 0.20)
File-HomeDir 0.88 (have 0.86)
File-Path 2.08 (have 2.07_03)
File-Which 1.09 (have 1.07)
HTML-Parser 3.64 (have 3.62)
IO-Compress 2.023 (have 2.020)
IPC-Cmd 0.54 (have 0.46)
JSON 2.16 (have 2.15)
Log-Message-Simple 0.06 (have 0.04)
Math-BigRat 0.24 (have 0.22)
Module-CoreList 2.24 (have 2.17)
Module-Load-Conditional 0.34 (have 0.30)
Module-Loaded 0.06 (have 0.02)
Object-Accessor 0.36 (have 0.34)
PathTools 3.31 (have 3.30)
Pod-Simple 3.13 (have 3.08)
SQL-Statement 1.23 (have 1.15)
Safe 2.20 (have 2.17)
Scalar-List-Utils 1.22 (have 1.21)
Sub-Uplevel 0.22 (have 0.2002)
Switch 2.16 (have 2.14)
Term-ReadLine-Perl 1.0303 (have 1.0302-r1)
Test-Differences 0.500 (have 0.4801)
Test-Simple 0.94 (have 0.92)
Text-CSV_XS 0.70 (have 0.67)
Text-Reform 1.20 (have 1.11)
URI 1.51 (have 1.40)
constant 1.19 (have 1.18)
parent 0.223 (have 0.221)
threads 1.75 (have 1.74)
threads-shared 1.32 (have 1.31)
version 0.78 (have 0.7701)

C:/>ppm install TimeDate
Downloading TimeDate-1.20...done
Unpacking TimeDate-1.20...done
Generating HTML for TimeDate-1.20...done
Updating files in site area...done
41 files installed

C:/>ppm install DateTime
Downloading DateTime-0.53...done
Downloading DateTime-Locale-0.44...done
Downloading DateTime-TimeZone-1.07...done
Downloading Params-Validate-0.94...done
Downloading List-MoreUtils-0.22...done
Downloading Class-Singleton-1.4...done
Unpacking DateTime-0.53...done
Unpacking DateTime-Locale-0.44...done
Unpacking DateTime-TimeZone-1.07...done
Unpacking Params-Validate-0.94...done
Unpacking List-MoreUtils-0.22...done
Unpacking Class-Singleton-1.4...done
Generating HTML for DateTime-0.53...done
Generating HTML for DateTime-Locale-0.44...done
Generating HTML for DateTime-TimeZone-1.07...done
Generating HTML for Params-Validate-0.94...done
Generating HTML for List-MoreUtils-0.22...done
Generating HTML for Class-Singleton-1.4...done
Updating files in site area...done
1393 files installed

C:/>ppm install Template-Toolkit
Downloading Template-Toolkit-2.22...done
Downloading AppConfig-1.66...done
Unpacking Template-Toolkit-2.22...done
Unpacking AppConfig-1.66...done
Generating HTML for Template-Toolkit-2.22...done
Generating HTML for AppConfig-1.66...done
Updating files in site area...done
154 files installed

C:/>ppm install Email-Send
Downloading Email-Send-2.198...done
Downloading Return-Value-1.666001...done
Downloading Email-Simple-2.100...done
Downloading Email-Address-1.889...done
Downloading Email-Date-Format-1.002...done
Unpacking Email-Send-2.198...done
Unpacking Return-Value-1.666001...done
Unpacking Email-Simple-2.100...done
Unpacking Email-Address-1.889...done
Unpacking Email-Date-Format-1.002...done
Generating HTML for Email-Send-2.198...done
Generating HTML for Return-Value-1.666001...done
Generating HTML for Email-Simple-2.100...done
Generating HTML for Email-Address-1.889...done
Generating HTML for Email-Date-Format-1.002...done
Updating files in site area...done
24 files installed

C:/>ppm install Email-MIME
Downloading Email-MIME-1.903...done
Downloading Email-MessageID-1.401...done
Downloading MIME-Types-1.28...done
Downloading Email-MIME-Encodings-1.313...done
Downloading Email-MIME-ContentType-1.015...done
Downloading Test-Pod-1.40...done
Unpacking Email-MIME-1.903...done
Unpacking Email-MessageID-1.401...done
Unpacking MIME-Types-1.28...done
Unpacking Email-MIME-Encodings-1.313...done
Unpacking Email-MIME-ContentType-1.015...done
Unpacking Test-Pod-1.40...done
Generating HTML for Email-MIME-1.903...done
Generating HTML for Email-MessageID-1.401...done
Generating HTML for MIME-Types-1.28...done
Generating HTML for Email-MIME-Encodings-1.313...done
Generating HTML for Email-MIME-ContentType-1.015...done
Generating HTML for Test-Pod-1.40...done
Updating files in site area...done
22 files installed

C:/>ppm install DBD-mysql
Downloading DBD-mysql-4.011...done
Unpacking DBD-mysql-4.011...done
Generating HTML for DBD-mysql-4.011...done
Updating files in site area...done
12 files installed

C:/>ppm install GDGraph
Downloading GDGraph-1.44...done
Unpacking GDGraph-1.44...done
Generating HTML for GDGraph-1.44...done
Updating files in site area...done
21 files installed

C:/>ppm install Net-LDAP-Express
Downloading Net-LDAP-Express-0.11...done
Downloading perl-ldap-0.39...done
Downloading Convert-ASN1-0.22...done
Unpacking Net-LDAP-Express-0.11...done
Unpacking perl-ldap-0.39...done
Unpacking Convert-ASN1-0.22...done
Generating HTML for Net-LDAP-Express-0.11...done
Generating HTML for perl-ldap-0.39...done
Generating HTML for Convert-ASN1-0.22...done
Updating files in site area...done
103 files installed

C:/>ppm install Chart
Downloading Chart-2.4.1...done
Unpacking Chart-2.4.1...done
Generating HTML for Chart-2.4.1...done
Updating files in site area...done
16 files installed

C:/>ppm install XML-Twig
Downloading XML-Twig-3.32...done
Unpacking XML-Twig-3.32...done
Generating HTML for XML-Twig-3.32...done
Updating files in site area...done
18 files installed

C:/>ppm install MIME-tools
Downloading MIME-tools-5.427...done
Downloading IO-stringy-2.110...done
Downloading MailTools-2.05...done
Unpacking MIME-tools-5.427...done
Unpacking IO-stringy-2.110...done
Unpacking MailTools-2.05...done
Generating HTML for MIME-tools-5.427...done
Generating HTML for IO-stringy-2.110...done
Generating HTML for MailTools-2.05...done
Updating files in site area...done
101 files installed

C:/>ppm install PatchReader
Downloading PatchReader-0.9.5...done
Unpacking PatchReader-0.9.5...done
Generating HTML for PatchReader-0.9.5...done
Updating files in site area...done
12 files installed

C:/>ppm install Authen-SASL
Downloading Authen-SASL-2.13...done
Unpacking Authen-SASL-2.13...done
Generating HTML for Authen-SASL-2.13...done
Updating files in site area...done
25 files installed

C:/>ppm install RadiusPerl
Downloading RadiusPerl-0.15...done
Downloading Data-HexDump-0.02...done
Unpacking RadiusPerl-0.15...done
Unpacking Data-HexDump-0.02...done
Generating HTML for RadiusPerl-0.15...done
Generating HTML for Data-HexDump-0.02...done
Updating files in site area...done
6 files installed

C:/>ppm install SOAP-Lite
Downloading SOAP-Lite-0.710.10...done
Downloading FCGI-0.67...done
Downloading MIME-Lite-3.027...done
Downloading Task-Weaken-1.03...done
Unpacking SOAP-Lite-0.710.10...done
Unpacking FCGI-0.67...done
Unpacking MIME-Lite-3.027...done
Unpacking Task-Weaken-1.03...done
Generating HTML for SOAP-Lite-0.710.10...done
Generating HTML for FCGI-0.67...done
Generating HTML for MIME-Lite-3.027...done
Generating HTML for Task-Weaken-1.03...done
Updating files in site area...done
93 files installed

C:/>ppm install HTML-Scrubber
Downloading HTML-Scrubber-0.08...done
Unpacking HTML-Scrubber-0.08...done
Generating HTML for HTML-Scrubber-0.08...done
Updating files in site area...done
2 files installed

C:/>ppm install Email-MIME-Attachment-Stripper
Downloading Email-MIME-Attachment-Stripper-1.316...done
Unpacking Email-MIME-Attachment-Stripper-1.316...done
Generating HTML for Email-MIME-Attachment-Stripper-1.316...done
Updating files in site area...done
2 files installed

C:/>ppm install Email-Reply
Downloading Email-Reply-1.202...done
Downloading Email-Abstract-3.001...done
Unpacking Email-Reply-1.202...done
Unpacking Email-Abstract-3.001...done
Generating HTML for Email-Reply-1.202...done
Generating HTML for Email-Abstract-3.001...done
Updating files in site area...done
16 files installed

C:/>ppm install MinGW
Downloading MinGW-5.1.4.1...done
Downloading dmake-4.11.20080107...done
Unpacking MinGW-5.1.4.1...done
Unpacking dmake-4.11.20080107...done
Generating HTML for MinGW-5.1.4.1...done
Generating HTML for dmake-4.11.20080107...done
Updating files in site area...done
1070 files installed

C:/>ppm repo add UWinnipeg http://cpan.uwinnipeg.ca/PPMPackages/10xx/

Downloading UWinnipeg packlist...done
Updating UWinnipeg database...done
Repo 2 added.

C:/>ppm repo add Trouchelle http://trouchelle.com/ppm10/

Downloading Trouchelle packlist...done
Updating Trouchelle database...done
Repo 3 added.

C:/>ppm install Template-GD
Downloading Template-GD-2.66...done
Unpacking Template-GD-2.66...done
Generating HTML for Template-GD-2.66...done
Updating files in site area...done
34 files installed

建议你在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:80Listen 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 apache2The Apache2 service is stopping..The Apache2 service was stopped successfully.C:/>net start apache2The 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 bugzillaE:/bugzilla>perl checksetup.plChecking perl modules ...Checking for       AppConfig (v1.52)   ok: found v1.55Checking for             CGI (v2.93)   ok: found v3.10Checking for    Data::Dumper (any)     ok: found v2.121_04Checking for    Date::Format (v2.21)   ok: found v2.22Checking for             DBI (v1.38)   ok: found v1.48Checking for      File::Spec (v0.84)   ok: found v3.05Checking for      File::Temp (any)     ok: found v0.16Checking for        Template (v2.08)   ok: found v2.13Checking for      Text::Wrap (v2001.0131) ok: found v2001.09293Checking for    Mail::Mailer (v1.65)   ok: found v1.67Checking for        Storable (any)     ok: found v2.13The following Perl modules are optional:Checking for              GD (v1.20)   ok: found v2.16Checking for     Chart::Base (v1.0)    ok: found v2.3Checking for     XML::Parser (any)     ok: found v2.34Checking for       GD::Graph (any)     ok: found v1.43Checking for GD::Text::Align (any)     ok: found v1.18Checking for     PatchReader (v0.9.4)  ok: found v0.9.5Most 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 wantto change and adapt to your local settings. Please edit the file'./localconfig' and rerun checksetup.plThe following variables are new to localconfig since you last ranchecksetup.pl:   index_html cvsbin interdiffbin diffpath create_htaccesswebservergroup db_driver db_host db_pass db_sock db_checkE:/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.plChecking perl modules ...Checking for       AppConfig (v1.52)   ok: found v1.55Checking for             CGI (v2.93)   ok: found v3.10Checking for    Data::Dumper (any)     ok: found v2.121_04Checking for    Date::Format (v2.21)   ok: found v2.22Checking for             DBI (v1.38)   ok: found v1.48Checking for      File::Spec (v0.84)   ok: found v3.05Checking for      File::Temp (any)     ok: found v0.16Checking for        Template (v2.08)   ok: found v2.13Checking for      Text::Wrap (v2001.0131) ok: found v2001.09293Checking for    Mail::Mailer (v1.65)   ok: found v1.67Checking for        Storable (any)     ok: found v2.13The following Perl modules are optional:Checking for              GD (v1.20)   ok: found v2.16Checking for     Chart::Base (v1.0)    ok: found v2.3Checking for     XML::Parser (any)     ok: found v2.34Checking for       GD::Graph (any)     ok: found v1.43Checking for GD::Text::Align (any)     ok: found v1.18Checking for     PatchReader (v0.9.4)  ok: found v0.9.5Most 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-debugCreating 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 yourfirst time using Bugzilla, or your administrator's privileges might haveaccidently been deleted.Enter the e-mail address of the administrator: byron@example.comYou entered 'byron@example.com'.  Is this correct? [Y/n] yEnter the real name of the administrator: Byron JonesEnter a password for the administrator account: beefPlease 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 输入框中。

maintainer:The email address of the person who maintains this installation of Bugzilla.byron@example.com
  将 Bugzilla 的URL填到 urlbase 域中,这个将被用在电子邮件中,所以不要填"localhost"。

urlbase:The URL that is the common initial leading part of all Bugzilla URLs.http://bugzilla.example.com/
  从 http://www.graphviz.org/Download_windows.php 下载并安装 WebDot ,将 dot.exe 的完整路径填入webdotbase 域中。

webdotbase:It is possible to show graphs of dependent bugs. You may set this parameter to any of the following:

* 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.E:/ATT/Graphviz/bin/dot.exe
使用计划任务
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 工具的帮助文档。

  恭喜,至此,你已经成功地完成了 Bugzilla 安装!

 

最后记得在httpd.conf的Directory加上
#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all

ScriptInterpreterSource Registry-Strict


</Directory>

 

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值