测试点滴

我说我是搞测试的。可是我还要系统维护。 我说我是搞系统维护的。我又要搞网络维护, 我说我是搞网络维护的,我又要。。。 所以说我是个打杂的。

IT博客网 首页 新随笔 联系 聚合 管理
  103 Posts :: 82 Stories :: 34 Comments :: 0 Trackbacks

决定将上星期安装BUGZILLA的经验告诉大家,希望能对那些正在为装BUGZILLA的朋友们有所帮助

网上有很多关于 bugzilla windows 环境下安装的资料,但是也有部分不适合自已,走到某一步总会出现一些错误提示,我整整花了一周的时间才配置好,现将我的安装步骤写下来,希望对大家有些启发。

我的配置清单如下: Mysql 5.0 + ActivePerl 5.8.8 + IIS + Bugzilla-2.20.2

具体安装步骤如下:

一、 mysql 5.0 ,安装的时候很简单,默认方式下安装,一直按下一步就行了记住安装路径和设置的 password ,如果有问题可以到 MySQL 官方网站( http://dev.mysql.com/doc/ )上查看在线手册。

接下来要配置 MySQL 。有些文章里写道需要手工修改 root 用户的密码,其实这一步在 MySQL 安装程序里就已经完成了,因此不用再去设置。我们要新建一个 Bug 数据库和一个 Bugzilla 访问这个数据库的用户。操作如下

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

 

Query OK, 1 row affected (0.11 sec)

 

mysql> grant all privileges on <database_name>.* to '<user_name>'@'<server_name>' identified by '<password>';

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 ' <user_name> '@' <server_name> ' = OLD_PASSWORD (' <password> ');

Query OK, 0 rows affected (0.00 sec)

 

mysql> quit

 

Bye

 

C:\mysql\bin>

OK !到此 MYSQL 已经安装配置完毕。这此为止才安装了四分之一。

呵呵,由于时间关系今天先写到这里,明天继续,下班了!

祝大家一路顺风!

一、   ActivePerl

1、  安装 Perl 也很容易,按照安装程序提示一步一步装就可以了。稍微复杂一点的是安装它的模块。不过有了 Bugzilla汉化项目 提供的批处理程序,这个步骤也非常简单了。只要双击 Setup.bat 文件就 OK

2、  如果没有批处理程序并且安装的机器不能上网,那只能自已手工安装了,首先到网站 http://landfill.bugzilla.org/ppm/   下载Modules到本机,然后在 DOS 环境下运行以下命令:

c:\ppm , 会出现一个 perl pack manager, 在这里设置存入 modules 的路径。

 

设置完以后再输入: c:\ppm install < 包名 > 另:在输入 install 命令之前需要到记着,别偷懒,一个一个装 完。

3、  如果将要安装 bugzilla 的机器能上网,不用下载那些 Modules 按以下操作将会更省事(蓝色字体需要手工输入的),这种方法我没试,但应该能成功。

												
														
																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 Bugzilla http://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>

三、配置IIS

1、打开IIS管理界面。新建一个虚拟路径,指向Bugzilla所在文件夹

2、然后按应用程序设置按钮。增加一个映射,将.cgi文件映射到perl.exe

ADD

这里特别注意,有些文档里写成:perl.exe “%s” %s(全角下的双引号),这样不正确,在运行时出错(又花去一个小时)。正确的配置应该如下:

 
\perl.exe -x -wT "%s" %s
例如:

c:\perl\bin\perl.exe -xc:\bugzilla -wT "%s" %s

 

3、最后,将index.cgi加入到默认文档列表中。最好移到最前面,这样可以加快查询速度。如果不希望/不能把index.cgi加入到默认文档列表中,也可以在安装Bugzilla的时候,将localconfig文件中$index_html的值改为1。这样运行checksetup.pl时,就会生成一个index.html,自动重定向到index.cgi

4OK! 到此IIS已配置完成,接下来才开始安装bugzilla了。


今天一定要写完:

四、安装bugzilla

其实这一步不叫安装的,将你下的bugzilla解压缩到一个文件夹里,我放到了c:\根目录下。进入到DOS环境,运行命令:perl checksetup.pl   它会检查你有没有将所有的Modules安装成功,安装不成功的Modules会提示no found.。出现以下界面证明已安装成功:

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 apache http://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>

 

2、接下来,在bugzilla的目录下打开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 = 'sockmonkey';

 

3、保存以后再次运行checksetup.pl。出现以下内容:别忘了记下输入的管理员的帐号和密码做为第一次登陆的用户和密码。

 

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 apache http://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