您的位置:首页 > 运维架构 > Apache

Windows 安装Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure Bugzilla)

2013-02-03 23:22 489 查看
参考资料:

Bugzilla 官方安装文档

一、下载软件

名字本文使用版本下载地址
Bugzilla4.2.4   下载
MySQL5.5.29  64-bit   下载
ActivePerl5.14.3.1404 64-bit       下载
Apache2.2.22  32-bit   下载
如何确认自己系统是32位还是64位,查看微软官方文档

二、MySQL安装与配置

1. 安装



















2. 配置 
C:\mysql\my.ini  ,可以先搜索下是否有以下两个字段(max_allowed_packet 和 ft_min_word_len ),如果没有再添加以下两行

max_allowed_packet = 4M
ft_min_word_len = 2


3. 创建Bugzilla的MySQL帐户

为Bugzilla创建一个MySQL帐户,在MySQL命令面板(开始 - MySQL - MySQL Command Line Client)中输入以下SQL命令

GRANT ALL PRIVILEGES ON bugs.* TO 'bugs'@'localhost' IDENTIFIED BY 'sockmonkey';




4. 验证参数是否成功,重启MySQL或者重启计算机,如果现在不想重启,也可以再后续配置完Apache后一起重启
show VARIABLES like '%max_allowed_packet%';


三、ActiveState Perl安装与配置

1. 安装ActivePerl











2.校验是否安装成功

准备安装插件前,建议先暂时关闭防火墙,可以在插件安装完成后再次打开防火墙。

Perl 5.8  与 Perl 5.10需要配置额外的资源库,具体可以自己查看官方文档,如果你的Perl版本高于5.12不需要添加,我这里使用的Perl是5.14不需要自己手动添加这些资料库。

校验Perl是否安装成功,可以在CMD中执行ppm version,如果显示错误,可以直接到Perl的bin目录下执行,例如:C:\Perl\bin\ppm version。

如果不想每次执行都是使用C:\Perl\bin\ppm version可以把路径添加到系统PATH中,具体做法如下

Windows 7

1. 从“开始”菜单选择“电脑”

2. 从上下文菜单选择“系统属性”

3. 单击“高级系统设置 > 高级”选项卡

4. 单击“环境变量”,然后在“系统变量”下找到 PATH 并单击。

5. 在“编辑”窗口中,添加自己的Perl目录注意前面有一个分号,;C:\Perl\bin

6. 再次打开“命令”提示窗口,然后运行Perl 或者 ppm

Windows XP

1. 开始 -> 控制面板 -> 系统 -> 高级

2. 单击“环境变量”,然后在“系统变量”下找到 PATH 并单击。

3. 在“编辑”窗口中,通过将类的位置添加到 PATH 的值来修改 PATH,添加自己的Perl目录注意前面有一个分号,;C:\Perl\bin

4. 关闭窗口。

5. 再次打开“命令”提示窗口,然后运行Perl 或者 ppm

3. 安装插件

打开CMD面板,输入以下命令。

例如:C:\>ppm upgrade --install,只需在CMD中输入ppm upgrade --install,前面的C:\>是CMD的当前目录提示符不需要输入。

C:\>ppm upgrade --install
C:\>ppm install AppConfig
C:\>ppm install TimeDate
C:\>ppm install DBI
正常提示:No missing packages to install
C:\>ppm install DBD-mysql
C:\>ppm install Template-Toolkit
C:\>ppm install MailTools
C:\>ppm install GD
正常提示:No missing packages to install
C:\>ppm install Chart
C:\>ppm install GDGraph
C:\>ppm install PatchReader
C:\>ppm install Net-LDAP-Express
C:\>ppm install DateTime
C:\>ppm install DateTime-TimeZone
C:\>ppm install Email-Send
C:\>ppm install Math-Random-ISAAC


四、Apache 安装与配置

1. 安装

















验证Apache是否安装成功



2. Apache配置httpd.conf文件

Windows 32位地址

C:\Program Files\Apache Group\Apache2\conf\httpd.conf

Windows 64位地址

C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\httpd.conf

# 在httpd.conf文件查找,并修改为相应的值
Listen 80
DocumentRoot "C:/Bugzilla"
<Directory "C:/Bugzilla">
AddHandler cgi-script .cgi
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
DirectoryIndex index.html index.html.var index.cgi
#CustomLog logs/access.log common

#在</Directory>结束符号之前,添加以下内容
#
# Tell Apache to use Perl to execute .cgi
#
ScriptInterpreterSource Registry-Strict


3. 配置注册表
开始 - 运行 - Regedit ,会打开注册表
在HKEY_CLASSES_ROOT目录,右键 - 新建项.cgi
在.cgi,右键 - 新建项Shell
在Shell,右键 - 新建项ExecCGI
在ExecCGI,右键 - 新建项Command
右侧默认值,右键 - 修改 ,填入C:\perl\bin\perl.exe -T




重启电脑,目的是为了让Apache生效。

五、Bugzilla安装与配置

1 解压

直接解压到C:\bugzilla

2 安装Bugzilla必须的ActivePerl插件

C:\>cd bugzilla

C:\bugzilla>perl checksetup.pl

COMMANDS TO INSTALL OPTIONAL MODULES:

Template-GD: ppm install Template-GD
MIME-tools: ppm install MIME-tools
XML-Twig: ppm install XML-Twig
RadiusPerl: ppm install RadiusPerl
SOAP-Lite: ppm install SOAP-Lite
JSON-RPC: ppm install JSON-RPC
JSON-XS: ppm install JSON-XS
Test-Taint: ppm install Test-Taint
HTML-Scrubber: ppm install HTML-Scrubber
Encode-Detect: ppm install Encode-Detect
Email-MIME-Attachment-Stripper: ppm install Email-MIME-Attachment-Stripper
Email-Reply: ppm install Email-Reply
TheSchwartz: ppm install TheSchwartz
Daemon-Generic: ppm install Daemon-Generic
mod_perl: ppm install mod_perl
Apache-SizeLimit: ppm install Apache-SizeLimit

COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands
and then re-run checksetup.pl):

ppm install Email-MIME

*** Installation aborted. Read the messages above. ***


先安装Email-Simple,http://code.activestate.com/ppm/Email-Simple/ 

64位
ppm install https://ppm4.activestate.com/MSWin32-x64/5.14/1400/R/RJ/RJBS/Email-Simple-2.102.ppmx 32位
ppm install https://ppm4.activestate.com/MSWin32-x86/5.14/1400/R/RJ/RJBS/Email-Simple-2.102.ppmx[/code] 
如果想正常通过认证,必须安装Email-MIME才行,当前使用ActivePerl版本是5.14  64-bit,使用如下命令安装

64位
ppm install https://ppm4.activestate.com/MSWin32-x64/5.14/1400/R/RJ/RJBS/Email-MIME-1.911.ppmx 32位
ppm install https://ppm4.activestate.com/MSWin32-x86/5.14/1400/R/RJ/RJBS/Email-MIME-1.911.ppmx


其他版本可以在以下链接中获取
http://code.activestate.com/ppm/Email-MIME/


成功后提示
C:\>cd bugzilla

C:\bugzilla>perl checksetup.pl

This version of Bugzilla contains some variables that you may want to
change and adapt to your local settings. The following variables are
new to ./localconfig since you last ran checksetup.pl:

create_htaccess, webservergroup, use_suexec, db_driver, db_host,
db_name, db_user, db_pass, db_port, db_sock, db_check, index_html,
cvsbin, interdiffbin, diffpath, site_wide_secret

Please edit the file ./localconfig and then re-run checksetup.pl
to complete your installation.


3. 配置Bugzilla

打开文件C:\Bugzilla\localconfig,如果以上第2步成功后才会出现此文件,搜索此文件中是否有这些字段$db_host,$db_port,$db_name,$db_user,$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';


4. 设置参数,以下byron相关的都填入自己的信息即可

C:\bugzilla>perl checksetup.pl

[...]
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.

C:\bugzilla>


5. 验证

点击此链接,如果打开以下界面,说明所有配置成功

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: