灿烂的阳光,苦涩的生活,认真做,你能行!

Windows下Bugzilla+Apache+mysql+Perl安装

上一篇 / 下一篇  2009-09-27 11:44:49 / 个人分类:bugzilla

Windows 下安装Bugzilla
shorelew@hotmail.com整理
本文将介绍搭建Windows下的Bugzilla服务器端的全部步骤。欢迎大家来信交流共同学习
Bugzilla
下载并安装Bugzilla
下载Bugzilla:http://bugzilla.org/download.html
本文是以Bugzilla2.20版本为例子进行安装,同时可以在网站上找到相应的汉化包,感谢汉化作者为我们提供的方便与支持。
下载解压缩到C:\Bugzilla ,保证Bugzilla文件放在C:\Bugzilla文件夹下,避免解压时生成多余的文件夹。
MySQL
下载 MySQL 4.1.x
下载MySQL "Windows Essentials"版本:http://dev.mysql.com/downloads/mysql/4.1.html
不推荐使用MySQL 5.x
安装
可以选择典型(Typial)安装MySQL,笔者安装时选择的自定义安装,并将安装目录设置为:C:\mysql。
创建Bugs数据库和用户
使用mysql 命令行创建,打开开始菜单-运行,输入cmd,打开命令行窗口进入C:\mysql\bin>
需要输入的蓝字命令如下:
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'@'localhost'identified by 'shorelew';
Query OK, 0 rows affected (0.03 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
C:\mysql\bin>
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'@'localhost'= OLD_PASSWORD('shorelew');
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
C:\mysql\bin>
ActiveState Perl
下载ActiveState Perl 5.8.1 或更高的版本
下载ActiveState Perl 5.8.1 或更高的版本:http://activestate.com/Products/Download/Download.plex?id=ActivePerl
安装Perl
将ActiveState Perl 安装到C:\Perl
创建Temp目录
创建 C:\Temp 目录确保系统在访问时进行更改。
安装 Modules
Bugzilla 需要安装一些perl模块,请确保你的计算机能连接到internet,所有需要模块都在http://landfill.bugzilla.org/ppm/
进入DOS命令行按如下蓝字操作,在安装到Template-Toolkit时注意按提示填写完成的安装路径。
C:\>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 Bugzillahttp://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>
Apache
这里推荐使用Apache 作为运行Bugzilla 的web引擎。如果你想将Bugzilla 运行在IIS上,可以参考:http://www.bugzilla.org/docs/2.18/html/configuration.html#http-iis
下载 Apache 2.x
下载Apache HTTP Server version 2.x 或更高版本:http://httpd.apache.org/download.cgi
安装
默认安装即可,假设安装的路径是C:\Program Files\Apache Group 它将安装在C:\Program Files\Apache Group\Apache2。
如果你已经运行了IIS,你在安装时配置apache运行在不同于80端口,否则你将不能访问。如果你的windows系统未安装IIS选择默认安装即可。
允许Apache 可写
创建如下目录:
• C:\Bugzilla\data
• C:\Program Files\Apache Group\Apache2\logs
• C:\Temp
配置httpd.conf文件
在记事本中编辑 C:\Program Files\Apache Group\Apache2\conf\httpd.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">
#
# 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>
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
在注册表中创建
HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command 编辑默认值为C:\Perl\bin\perl.exe -T
#
# 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
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 apachehttp://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
打开C:\Bugzilla\localconfig 找到上一个步骤创建的localconfig文件用记事本编辑它,内容如下,请对照是否有蓝字所标出的内容,如没有显示如下内容请在localconfig文件中修改。
#
# 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 = 'shorelew';
checksetup.pl
再次运行checksetup.pl 。这时将创建数据库相关表和初始化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 apachehttp://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:shorelew@example.com
You entered'byron@example.com'. Is this correct? [Y/n] y
Enter the real name of the administrator: shorelew
Enter a password for the administrator account: shore
Please retype the password to verify: shore
'shorelew@example.com'is now set up as an administrator account.
C:\bugzilla>
参数配置
现在就可以通过http://localhost/登陆Bugzilla,至此你就能使用等待以久的Bugzilla缺陷跟踪系统了,经过漫长的安装后,如果能和你一起分享安装成功的喜悦,可以写信给我噢!偶的MSN是:shorelew@hotmail.com
打开登陆页面后,使用上面你输入的邮箱和密码就可以登陆了,在登陆页面右下角点选Parameters设置。
Bugzilla其他信息
Bugzilla汉化包
http://bugzilla.org/download.html里能找到相应的bugzilla汉化包,本文的例子包使用的是2.20版本的。在包内有汉化的相关内容,很容易就能汉化。
本文内容相关
为了能更好的安装和调试Bugzilla,推荐下列网站,以供参考。
http://httpd.apache.org/docs-2.0/mod/core.html#scriptinterpretersourcehttp://support.microsoft.com/default.aspx?scid=kb;en-us;231998http://support.microsoft.com/default.aspx?scid=kb;en-us;245225
如果还有一些疑问,关于windows下在安装Bugzilla更详尽的内容请参考:http://www.bugzilla.org/docs/win32install.html

TAG:

千里专版 引用 删除 千里   /   2010-07-28 09:57:57
没看到关键步骤apache是如何配置的
 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar