天天看點

bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...

參考資料:

一、下載下傳軟體

名字

本文使用版本

下載下傳位址

Bugzilla

4.2.4

MySQL

5.5.29  64-bit

ActivePerl

5.14.3.1404 64-bit

Apache

2.2.22  32-bit

如何确認自己系統是32位還是64位,檢視微軟官方文檔

二、MySQL安裝與配置

1. 安裝

bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...

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';

bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...

4. 驗證參數是否成功,重新開機MySQL或者重新開機計算機,如果現在不想重新開機,也可以再後續配置完Apache後一起重新開機

show VARIABLES like '%max_allowed_packet%';

三、ActiveState Perl安裝與配置

1. 安裝ActivePerl

bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...

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. 安裝

bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...
bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...

驗證Apache是否安裝成功

bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...

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"

AddHandler cgi-script .cgi

Options Indexes FollowSymLinks ExecCGI

AllowOverride All

DirectoryIndex index.html index.html.var index.cgi

#CustomLog logs/access.log common

#在結束符号之前,添加以下内容

#

# 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

bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...

重新開機電腦,目的是為了讓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

如果想正常通過認證,必須安裝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/

bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...

成功後提示

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: [email protected]

You entered '[email protected]'. 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

'[email protected]' is now set up as an administrator account.

C:\bugzilla>

5. 驗證

點選此連結,如果打開以下界面,說明所有配置成功

bugzilla perl mysql apache windows_天天記錄 - Windows 安裝Bugzilla(MySQL+ActivePerl+Apache/IIS+Configure B...