在 Microsoft Windows下安装Bugzilla

来源:互联网 发布:大数据时代 宣传片 编辑:程序博客网 时间:2024/04/28 17:52

Bugzilla version 2.22 stable Release

http://bugzilla.org/download.html(下载)

MySQL

下载 MySQL

http://dev.mysql.com/downloads/mysql/ (15.9 Meg). 选择windows版本的安装程序。假如安装路径为C:/mysql

新建bug数据库和用户

用‘bugs’密码来访问数据库bugs

C:/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'@'192.168.1.2' 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

如果你是用的是MySQL4.1 或更高的版本,会遇到Client does not support authentication protocol requested by server 的错误信息,需要使用 OLD_PASSWORD来重置密码:

C:/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'@'192.168.1.2' = OLD_PASSWORD('bugs');

Query OK, 0 rows affected (0.00 sec)

mysql> quit

Bye

ActiveState Perl

 http://activestate.com/Products/Download/Download.plex?id=ActivePerl (12.5 Meg).

安装到C:/Perl

安装bugzilla所需的模块http://sourceforge.net/project/showfiles.php?group_id=75477,下载bugzillaModules-2.20

echo off

REM cd Modules
REM copy NMAKE.exe C:/WINDOWS/system32

REM ppm rep add "localrep" ..
echo 本批处理程序将安装 Bugzilla 2.20 所需要的所有模块(包括可选的和必须的)。安装的模块较多,可能要花费几分钟, 请稍候 ... ...
pause

call ppm install File-Spec.ppd

call ppm install CGI.ppd

call ppm install PatchReader.ppd

call ppm install DBI.ppd

call ppm install DBD-mysql.ppd

call ppm install TimeDate.ppd

call ppm install Mailtools.ppd

call ppm install IO-Stringy.ppd

call ppm install IO-String.ppd

call ppm install Image-Info.ppd

call ppm install Image-Size.ppd

call ppm install MIME-Base64.ppd

call ppm install MIME-tools.ppd

call ppm install GD.ppd

call ppm install Chart.ppd

call ppm install AppConfig.ppd

call ppm install Template-Toolkit.ppd

call ppm install GDTextUtil.ppd

call ppm install GDGraph.ppd

运行这些

Download Apache 2.2。2

http://httpd.apache.org/download.cgi (5.8 Meg)

 

安装并配置

.

配置Port 和DocumentRoot

修改C:/Program Files/Apache Group/Apache2/conf/httpd.conf #

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

配置 CGI

uncommenting the AddHandler cgi-script .cgi line.

#

# 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

Change AllowOverride None to AllowOverride All.

 

#

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

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

修改注册表来实现.cgi的执行

Create a key HKEY_CLASSES_ROOT/.cgi/Shell/ExecCGI/Command 值为 C:/Perl/bin/perl.exe -T

Disable Logging

by commenting out the CustomLog directive.

#

# 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

Restart Apache

配置Bugzilla

checksetup.pl

运行后会产生文件 localconfig.

C:/>cd bugzilla

C:/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

C:/bugzilla>

编辑localconfig

#

# How to access the SQL database:

#

$db_host = "192.168.1.2";         # 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

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: phiqy@example.com

You entered 'phiqy@example.com'.  Is this correct? [Y/n] y

Enter the real name of the administrator: Phiqy Qi

Enter a password for the administrator account: 12345

Please retype the password to verify: 12345

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

C:/bugzilla>

配置完毕