- Bugzilla
- MySQL
- ActiveStatePerl
- Apache
- DownloadApache 2x
- Install Apache
- 我安装的时候输入的domanic为 bugzillacom
- wwwbugzillacom
- text126com我这里用的是自己的邮箱各位可以自己填写
- 可以安装在默认的路径下面但是你的机器如果已经使用了IIS那么你就不能使用80端口了将权限给所有人的是80端口那么后面就需要配置了
- Grantwrite access for Apache account
- 配置端口和文件的根目录
- 编辑CProgram FilesApacheGroupApache2confhttpdconf
- Listen 1234567880
- Listen 80
- 配置CGI
- 将语句前面的
- 去掉
- 停止登陆
- 处理用户登陆信息
- 重启Apache
- 配置Bugzilla
Bugzilla
安装Bugzilla 从TarBall
Bugzilla download page (2.9MB). 在该下载页面下载bugzilla。用windows的解压工具解压,我下载的是4.2.4.
将解压后的文件放在C:\Bugzilla.
MySQL
下载MySQL
下载 MySQL 32-bit or 64-bitMSI installer from the MySQL website(28 MB). 我下载了最新的msi的软件。Mysql的版本为5.1.52
安装
Mysql的安装是标准的window的安装,选择typical的安装方式,或者你可以考虑安装在C盘的根目录下。C:\Mysql
修改一下参数:
点击Mysql的命令行(或者安装GUI的界面)
修改参数可以使用mysql --max_allowed_packet=32M
或者打开更目录下面的my-large.ini的文件修改max_allowed_packet为32M
说实话,这里有很多和my有关系的文件,我实在是搞不清楚,那个有用,那个没有用。有待于baidu
Now change a few settings. Goto C:\mysql server 5.0\bin\my.ini and set themax_allowed_packet
setting to4M
. Underneath that, add the following line:
ft_min_word_len = 2
这段话我没有没有搞得非常明白,或许我对数据库还不够了解。
创建数据库的用户
cmd命令行中,命令中初始化,或者是利用mysql的自带的进行初始化
C:\mysql\bin>mysql --user=root -p mysql
例如我安装的时候密码是root。就输入root
Enter password: ********
显示为:
mysql> GRANT ALL PRIVILEGES ON bugs.* TO 'bugs'@'localhost' IDENTIFIED BY '123456';
我的新的密码为123456
mysql> quit
退出输入
ActiveStatePerl
下载ActiveState Perl
下载 ActiveState Perl 5.12.4or higher MSI installer from the ActiveState website.
注意的是,现在的bugzilla需要的是比Perl5.8.1 或者更高的版本,但是越是要求高,越是需要更高的ActivePerl 5.12 或者高版本
如果是Bugzilla 4.2 至少需要 Perl 5.8.x去支持。下面的一个版本可能需 The Perl 5.10.1 更加好,应该版本更高,修复了更多的bug,现在呢,我就下载最新的5.16.1
我原先安装的是最新的版本5.16.1。
我最后还是安装5.14
由于免费的没有了5.12,所以现在还是下载5.14的比较稳定。为什么不用5.16.1呢,由于我在解决安装Template-Toolkit的时候有一些问题,可能是由于安装版本的问题造成的。
安装:
安装路径为C:\Perl.如果安装的路径是(eg "C:\Program Files")有可能会阻止安装Template-Toolkit
如果你已经完成了安装,那就退出来,并且变换path
安装模块Modules
Bugzilla需要一些不同的perl的modules,一些链接如下
Perl 5.8.x: http://theoryx5.uwinnipeg.ca/ppms/
Perl 5.10.x: http://cpan.uwinnipeg.ca/PPMPackages/10xx/and http://trouchelle.com/ppm10/
Perl 5.12 不需要安装额外的,他已经包含了bugzilla所需要的所有的,另外记得关闭防火墙。
下面的是以下主要的输出在5.10.x的perl 模块上,如果你不要这些,或者你选择用GUI的图形界面,去需找perl 的Perl Package Manager(ppm)在windows的开始栏中。
)
C:\>ppm version
C:\>ppm repo add UWinnipeg http://cpan.uwinnipeg.ca/PPMPackages/10xx/C:\>ppm repo addhttp://cpan.uwinnipeg.ca/PPMPackages/10xx/
C:\>ppm repo list
+---------------------------------------------+
¦ id ¦ pkgs ¦ name ¦
+----+-------+--------------------------------¦
¦ 1 ¦ 12493 ¦ ActiveState Package Repository ¦
¦ 2 ¦ 0 ¦ UWinnipeg ¦
¦ 3 ¦ 0 ¦ Trouchelle ¦
+---------------------------------------------+
(3 enabled repositories)
这边的显示因人而异啦。我如下
C:\>ppm upgrade
C:\>ppm install AppConfig
C:\>ppm install TimeDate
C:\>ppm install DBI
C:\>ppm install DBD-mysql
C:\>ppm install Template-Toolkit
Downloading Template-Toolkit-2.22...done
Unpacking Template-Toolkit-2.22...done
Generating HTML for Template-Toolkit-2.22...done
Updating files in site area...done
140 files installed
C:\>ppm install MailTools
C:\>ppm install GD
C:\>ppm install Chart
C:\>ppm install GDGraph
C:\>ppm install PatchReader
C:\>ppm install Net-LDAP-Express
Apache
有两种方式构建,1,构建IIS另外一种是利用Apache去构建。
DownloadApache 2.x
下载 the Apache HTTP Serverversion 2.2.x or higher from: http://httpd.apache.org/download.cgi
Install Apache
我安装的时候,输入的domanic为 bugzilla.com
www.bugzilla.com
text@126.com(我这里用的是自己的邮箱,各位可以自己填写)
可以安装在默认的路径下面,但是你的机器如果已经使用了IIS,那么你就不能使用80端口了。将权限给所有人的是80端口。那么后面就需要配置了。
Grantwrite access for Apache account
By default Apache will run as theSYSTEM account. This account needs write and modify access to the followingdirectorys, and all their subdirectories. Depending on your version of Windows,this access may already be granted.
- C:\Bugzilla\data
- C:\Program Files\Apache Group\Apache2\logs
- C:\Temp
- C:\Windows\Temp
注意C:\Bugzilla\data是被你运行了checksetup.pl之后被创建的。
配置端口和文件的根目录
编辑C:\Program Files\ApacheGroup\Apache2\conf\httpd.conf
#Listen 12.34.56.78:80
Listen 80
改变DocumentRoot 的设置,将其设置为C:\Bugzilla.注意的是这里的httpd.conf有两个地方需要修改。在指定文件的位置时我们需要用/ 代替 \ 作为路径的分隔。
"C:/Bugzilla"
<Directory "C:/Bugzilla">
修改完成之后,保存。
配置CGI
将语句前面的#
去掉
AddHandler cgi-script .cgi
允许.cgi的脚本在bugzilla库中增减exceCGI的点,我们也需要允许bugzilla。htaccess文件来限制访问敏感文件,允许它覆盖缺省值。包括将AllowOverride None 变化成AllowOverride All. Apache需要知道perl去执行.cgi的文件通过ScriptInterpreterSource去区分
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
在下面的位置增加下面的语句
# Tell Apache to use Perl to execute .cgi # ScriptInterpreterSource Registry-Strict
你也需要增加index.cgi到DirectoryIndex的列表。
增加内容如下:
# 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
为了能够让ScriptInterpreterSourceRegistry-Strict去工作, 你还要增加注册表去让Perl去执行.Cgi的文件。
在注册表中创建一个项HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command
他的值为C:\Perl\bin\perl.exe-T
停止登陆
处理用户登陆信息
Unless you want to keepstatistics on how many hits your Bugzilla install is getting, it's a good ideato disable logging by commenting out theCustomLog directive.
#CustomLog logs/access.log common
记住,可以没做一步就重启一下,以便检查,是不是那边输入错误了。
重启Apache
最后重启Apache去应用改变。
C:\>net stop apache2.2
C:\>net start apache2.2
配置Bugzilla
checksetup.pl
运行 checksetup.pl. 检查你的Perl的模块和创建一个localconfig.
C:\>cd bugzilla
C:\bugzilla>perl checksetup.pl
这里可能会出现不少组件没有安装上去。
例如:
拷贝之后,重新安装
http://ppm4.activestate.com/MSWin32-x86/5.16/1600/
Set up gcc environment - 4.4.3
* This is Bugzilla 4.1.3 on perl 5.14.1
* Running on Win7 Build 7601 (Service Pack 1)
Checking perl modules...
Checking for CGI.pm (v3.51) ok: found v3.55
Checking for Digest-SHA (any) ok: found v5.62
Checking for TimeDate (v2.21) ok: found v2.24
Checking for DateTime (v0.28) ok: found v0.70
Checking for DateTime-TimeZone (v0.79) ok: found v1.35
Checking for DBI (v1.614) ok: found v1.616
Checking for Template-Toolkit (v2.22) ok: found v2.22
Checking for Email-Send (v2.16) ok: found v2.198
Checking for Email-MIME (v1.904) ok: found v1.908
Checking for URI (v1.37) ok: found v1.58
Checking for List-MoreUtils (v0.22) ok: found v0.32
Checking for Math-Random-ISAAC (v1.0.1) ok: found v1.004
Checking for Win32 (v0.35) ok: found v0.44
Checking for Win32-API (v0.55) ok: found v0.62
Checking available perl DBD modules...
Checking for DBD-Pg (v1.45) ok: found v2.17.2
Checking for DBD-mysql (v4.001) ok: found v4.019
Checking for DBD-SQLite (v1.29) ok: found v1.33
Checking for DBD-Oracle (v1.19) ok: found v1.27
The following Perl modules are optional:
Checking for GD (v1.20) ok: found v2.45
Checking for Chart (v2.1) ok: found v2.4.2
Checking for Template-GD (any) ok: found v1.56
Checking for GDTextUtil (any) ok: found v0.86
[...]
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>
遇到问题如何解决?
之后我又将其他的ppm包安装了一回
如在检查的时候遇到问题,也就是组件安装不上去。我们必须想办法解决它。
1. 我在安装Email-MIME的时候遇到了问题,解决方法如下:
C:\>ppm install Email-MIME ppm install failed: Can't find any package that provides Email::Simpleversion 2 .102 for Email-MIME
C:\>ppm upgrade Email-Simple
*** no upgrades available for Email-Simple ***
C:\>ppm search Email-Simple
1: Email-Simple
unknown
Version: 2.101
Released: 2011-12-23
Author: Ricardo SIGNES <r...@cpan.org>
Provide: Email::Simple version 2.101
Provide: Email::Simple::Creator version 2.101
Provide: Email::Simple::Header version 2.101
Require: Email::Date::Format
Require: Test::More version 0.47 or better
Repo: ActiveState Package Repository
Link: http://ppm4.activestate.com/MSWin32-x86/5.16/1600/R/RJ/RJBS/Email-Simpl
e-2.101.ppmx
CPAN: http://search.cpan.org/dist/Email-Simple-2.101/
Installed: 2.101 (site)
INSTALL LATEST VERSION of Email-Simple
C:\>perl -S cpan
cpan> install Email::Simple
cpan> quit
INSTALL Email-MIME
C:\>ppm install Email-MIME
Syncing site PPM database with .packlists...done
Syncing perl PPM database with .packlists...done
Downloading Email-MIME-1.911...done
Downloading Email-MessageID-1.402...done
Downloading MIME-Types-1.35...done
Downloading Email-MIME-Encodings-1.313...done
Downloading Email-MIME-ContentType-1.015...done
Unpacking Email-MIME-1.911...done
Unpacking Email-MessageID-1.402...done
Unpacking MIME-Types-1.35...done
Unpacking Email-MIME-Encodings-1.313...done
Unpacking Email-MIME-ContentType-1.015...done
Generating HTML for Email-MIME-1.911...done
Generating HTML for Email-MessageID-1.402...done
Generating HTML for MIME-Types-1.35...done
Generating HTML for Email-MIME-Encodings-1.313...done
Generating HTML for Email-MIME-ContentType-1.015...done
Updating files in site area...done
20 files installed
OPTIONAL: MinGW is installed when using"perl -S cpan". It caused a conflict for me later.
C:\>ppm uninstall MinGW
MinGW: uninstalled
我在安装数据库的时候出现了下面的错误:
install_driver(mysql)failed: Attempt to reload DBD/mysql.pm aborted.
Compilation failed inrequire at (eval 433) line 3, <DATA> chunk 577.
at Bugzilla/DB.pm line1284
图片来自于网路上。
我折腾了很久,我后来找到了解决的方法。这些方法是在网上看到的,参考来源为:
http://hi.baidu.com/qpbxnxmrjuehuvr/item/fcec90695a1e92167ddecc98
C:\>perl -S cpan
cpan>get BDI
cpan>get DBD:mysql
cpan>get CGI
做完之后
输入:
cpan>install DBI
cpan>install DBD::mysql
cpan>install CGI
之后,上述的问题就没有了
安装数据库的时候出错了,进入的cpan里面去解决。
编辑localconfig 文件
打开 C:\Bugzilla\localconfig 用你的text的编辑器去编辑,去完成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
运行checksetup.pl 在一次,就可以安装数据库初始化文件了。
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>