在windows下Bugzilla的配置
安装环境:
操作系统:win2003
perl解释器:ActivePerl(5.12.5.1)
数据库:MySQL
bugzilla-4.0.2
web server: Apache 2.2
安装步骤:
1将mysql,安装在某个目录下。
通过cmd,进入到mysql的bin目录,用mysql-u root -p进入mysql的配置管理
首先创建bugs数据库:
mysql>create database bugs; (注意,末尾有个分号)
创建bugs用户,并授权
mysql>GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, DROP,REFERENCES, LOCK TABLES, CREATE TEMPORARY TABLES ON bugs.* TO bugs@localhost
IDENTIFIEDBY 'dayang';
修改bugs用户的密码:
mysql>set password for 'bugs'@'localhost' = OLD_PASSWORD('bugspassword');
最后刷新一下
mysql> FLUSH PRIVILEGES;
检查bugs用户是否创建成功:
mysql> quit
mysql> mysql -u bugs -p
Enter password:bugs
2 安装 ActivePerl到某个路径下,我安装到C盘。
3 经下载的bugzilla 解压到某个目录下,在dos下键入安装bugzilla的bin目录执行checksetup.pl文件,
出现以下代码:
Checkingperl modules…
Checking for CGI (v2.93) ok: found v3.29
Checking for TimeDate (v2.21) not found
Checking for PathTools (v0.84) ok: found v3.25
Checking for DBI (v1.41) ok: found v1.58
Checking for Template-Toolkit (v2.15) not found
Checking for Email-Send (v2.16) not found
Checking for Email-MIME-Modifier (any) not found
Checking available perl DBD modules…
Checking for DBD-Pg (v1.45) not found
Checking for DBD-mysql (v4.00) not found
Checking for DBD-Oracle (v1.19) not found
只安装现在要用的包,其他以后用到在安装。
选择安装ppm install TimeDate
ppm install Template-Toolkit
如果有的模块在主站下载不到,可以使用--force从其他站点下载;如上面的ppm install --force Email-Send
perl模块会下载到 Perl安装目录下的site/lib中,
也可以
然后在
D:\bugzilla-4.0.2>ppm repo add UWinnipeg http://cpan.uwinnipeg.ca/PPMPackages/10xx/
Downloading ActiveState PackageRepository packlist...done
Updating ActiveState PackageRepository database...done
Downloading UWinnipeg packlist...done
Updating UWinnipegdatabase...done
Repo 2 added.
D:\bugzilla-4.0.2>ppm repo add Trouchelle http://trouchelle.com/ppm10/
Downloading Trouchelle packlist...done
Updating Trouchelle database...done
Repo 3 added.
D:\bugzilla-4.0.2>ppm upgrade
Syncing site PPM database with .packlists...done
Archive-Tar 1.54 (have 1.52-r1)
Attribute-Handlers 0.87 (have 0.86)
AutoLoader 5.70 (have 5.69)
Bit-Vector 7.1 (have 6.9)
Class-Accessor 0.34 (have 0.33)
Class-ISA 0.36 (have 0.33)
Compress-Raw-Bzip2 2.021 (have 2.020)
Compress-Raw-Zlib 2.021 (have 2.020)
DBD-ODBC 1.23 (have 1.22)
DBI 1.609 (have 1.607)
Date-Calc 5.8 (have 5.6)
Encode 2.37 (have 2.35)
ExtUtils-CBuilder 0.260301 (have 0.2603)
ExtUtils-Manifest 1.57 (have 1.56)
ExtUtils-ParseXS 2.21 (have 2.2002)
File-Path 2.08 (have 2.07_03)
File-Which 1.09 (have 1.07)
IO-Compress 2.021 (have 2.020)
IPC-Cmd 0.50 (have 0.46)
Log-Message-Simple 0.06 (have 0.04)
Math-BigRat 0.24 (have 0.22)
Module-CoreList 2.20 (have 2.17)
Module-Loaded 0.06 (have 0.02)
Object-Accessor 0.36 (have 0.34)
Safe 2.19 (have 2.17)
Test-Simple 0.94 (have 0.92)
Text-CSV_XS 0.68 (have 0.67)
Text-Reform 1.20 (have 1.11)
constant 1.19 (have 1.18)
parent 0.223 (have 0.221)
version 0.7702 (have 0.7701)
D:\bugzilla-4.0.2>ppm install AppConfig
Downloading AppConfig-1.66...done
Unpacking AppConfig-1.66...done
Generating HTML for AppConfig-1.66...done
Updating files in site area...done
14 files installed
D:\bugzilla-4.0.2>ppm install TimeDate
Downloading TimeDate-1.19...done
Unpacking TimeDate-1.19...done
Generating HTML for TimeDate-1.19...done
Updating files in site area...done
41 files installed
D:\bugzilla-4.0.2>ppm install DBI
No missing packages to install
D:\bugzilla-4.0.2>ppm install DBD-mysql
Downloading DBD-mysql-4.011...done
Unpacking DBD-mysql-4.011...done
Generating HTML for DBD-mysql-4.011...done
Updating files in site area...done
12 files installed
D:\bugzilla-4.0.2>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
D:\bugzilla-4.0.2>ppm install MailTools
Downloading MailTools-2.04...done
Downloading Test-Pod-1.40...done
Unpacking MailTools-2.04...done
Unpacking Test-Pod-1.40...done
Generating HTML for MailTools-2.04...done
Generating HTML for Test-Pod-1.40...done
Updating files in site area...done
43 files installed
D:\bugzilla-4.0.2>ppm install GD
No missing packages to install
D:\bugzilla-4.0.2>ppm install Chart
Downloading Chart-2.4.1...done
Unpacking Chart-2.4.1...done
Generating HTML for Chart-2.4.1...done
Updating files in site area...done
16 files installed
D:\bugzilla-4.0.2>ppm install GDGraph
Downloading GDGraph-1.44...done
Unpacking GDGraph-1.44...done
Generating HTML for GDGraph-1.44...done
Updating files in site area...done
21 files installed
D:\bugzilla-4.0.2>ppm install PatchReader
Downloading PatchReader-0.9.5...done
Unpacking PatchReader-0.9.5...done
Generating HTML for PatchReader-0.9.5...done
Updating files in site area...done
12 files installed
D:\bugzilla-4.0.2>ppm install Net-LDAP-Express
Downloading Net-LDAP-Express-0.11...done
Downloading perl-ldap-0.39...done
Downloading Convert-ASN1-0.22...done
Unpacking Net-LDAP-Express-0.11...done
Unpacking perl-ldap-0.39...done
Unpacking Convert-ASN1-0.22...done
Generating HTML for Net-LDAP-Express-0.11...done
Generating HTML for perl-ldap-0.39...done
Generating HTML for Convert-ASN1-0.22...done
Updating files in site area...done
103 files installed
安装完所有的模块后,再次运行perlchecksetup.pl,如果主要的模块都正确安装,会在bugzilla的目录下生成一个localconfig文件修改该文件,主要是以下几个配置:
$db_host = 'localhost';
$db_name = 'bugs';
$db_user = 'bugs';
$db_pass = 'bugs';
4 安装Apache,安装完成后可能无法启动Apache服务器,必须在dos下进行激活操作,进入dos,先键入到 C:\,进入安装Apache的bin目录,
D:\apache2\bin> httpd.exe -k install -n apache2
然后启动 net start apache
apache的几乎所有的配置都在安装目录下conf文件夹下的httpd.conf文件中。打开该文件做以下几个修改:
1 确定监听端口未被占用,默认为80端口,如果被其他web服务器占用,则修改该端口号
Listen 8080
2 修改主目录配置
若要直接通过http://localhost/访问,则修改主目录
修改DocumentRoot参数,默认情况下该参数是指向apache的安装目录下的htdos文件夹,修改该参数为bugzilla的安装路径下。同时要记得修改下面的参数
配置CGI访问,需要把下面这一句前面的#给去掉
AddHandler cgi-script .cgi
找到#!c:/programfiles/perl/perl将#!后的路径修改为你的perl安装的路径。
修改Options IndexesFollowSymLinks 为 Options Indexes FollowSymLinks ExecCGI
修改AllowOverride None为AllowOverrideAll
在AllowOverride All下一行添加ScriptInterpreterSourceRegistry-Strict在把 DirectoryIndex index.htmlindex.html.var 换成 DirectoryIndex index.htmlindex.html.var index.cgi
3修改注册表,新建项HKEY_CLASSES_ROOT/.cgi/Shell/ExecCGI/Command修改默认值为
%perl的安装路径%/bin/perl.exe -T重启apache
配置完成,输入
http://localhost:8080/ 就可以看到bugzilla的主页面了