|
决定将上星期安装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 ;
Query OK, 1 row affected (0.11 sec)
mysql> grant all privileges on .* to ''@'' identified by '';
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 ''@'' = OLD_PASSWORD ('');
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
C:\mysql\bin> |
OK!到此MYSQL已经安装配置完毕。这此为止才安装了四分之一。 X噣tA漘深 仪s2 一、 装ActivePerl
1、 安装Perl也很容易,按照安装程序提示一步一步装就可以了。稍微复杂一点的是安装它的模块。不过有了Bugzilla汉化项目提供的批处理程序,这个步骤也非常简单了。只要双击Setup.bat文件就OK了
2、 如果没有批处理程序并且安装的机器不能上网,那只能自已手工安装了,首先到网站 http://landfill.bugzilla.org/ppm/ 下载Modules到本机,然后在DOS环境下运行以下命令:
c:\ppm ,会出现一个perl pack manager,在这里设置存入modules的路径。 鞱
犿庩 h 鮇f=険 隝'p賉薆 筄ㄎ礙 设置完以后再输入:c:\ppm install <包名> 另:在输入install命令之前需要到记着,别偷懒,一个一个装 完。
3、 如果将要安装bugzilla的机器能上网,不用下载那些Modules按以下操作将会更省事(蓝色字体需要手工输入的),这种方法我没试,但应该能成功。
C:\>ppm 豺踆副s幬 L;D0液
PPM - Programmer's Package Manager version 3.1 每RP飸K .Copyright (c) 2001 ActiveState Corp. 朻QL0滸磔 All Rights Reserved.ActiveState is a devision of Sophos. ns9,鳀{ Entering interactive shell. -# 鄬4K Using Term::ReadLine::Stub as readline library. xG媬唪R螕$ Type 'help' to get started. 骞眣`I5m ppm> rep add Bugzilla http://landfill.bugzilla.org/ppmRepositories:[1] ActiveState PPM2 Repository[2] ActiveState Package Repository[3] Bugzillappm> install AppConfig Gg絩T淬 ==================== 脄>eg児 Install 'AppConfig' version 1.52 in ActivePerl 5.8.7.813. %黲^ ==================== 箖申F}> Downloaded 50508 bytes....Successfully installed AppConfig version 1.52 in ActivePerl 5.8.7.813.ppm> install TimeDate 6p矠7蚍 ==================== {嫚
=鋁 Install 'TimeDate' version 1.16 in ActivePerl 5.8.7.813. G餅sa ==================== 眪_厃搜 Downloaded 19235 bytes....Successfully installed TimeDate version 1.16 in ActivePerl 5.8.7.813.ppm> install DBI mu焹y絝[} ==================== $;圔递 Install 'DBI' version 1.43 in ActivePerl 5.8.7.813. 毠
s ==================== ]樯渮@xP Downloaded 508164 bytes....Successfully installed DBI version 1.43 in ActivePerl 5.8.7.813.ppm> install DBD-mysql x.3:癵 ==================== 沺/9&积匴 Install 'DBD-mysql' version 2.9002 in ActivePerl 5.8.7.813. e[己,"魌 ==================== ?爩S詥?秄 Downloaded 178803 bytes....Successfully installed DBD-mysql version 2.9002 in ActivePerl 5.8.7.813.ppm> install Template-Toolkit Um躌"霰@K ==================== Q*墊菵b瓻 Install 'Template-Toolkit' version 2.13 in ActivePerl 5.8.7.813 . y~ EN妉> ==================== 燺57@莏V贙 Downloaded 530770 bytes....Successfully installed Template-Toolkit version 2.13 in ActivePerl 5.8.7.813.ppm> install MailTools N7祿J洫 ==================== c鋍駻L7 Install 'MailTools' version 1.67 in ActivePerl 5.8.7.813. 葛A0韏塯R ==================== #g£X) Downloaded 46881 bytes....Successfully installed MailTools version 1.67 in ActivePerl 5.8.7.813.ppm> install GD 'M斀/鹌 ==================== &u砖P
/ Install 'GD' version 2.07 in ActivePerl 5.8.7.813. 堽7欺e5k ==================== 祓S峢筁 Downloaded 363039 bytes....Successfully installed GD version 2.07 in ActivePerl 5.8.7.813.ppm> install Chart 9澋汷`H ==================== 2@qm腘 Install 'Chart' version 2.3 in ActivePerl 5.8.7.813.
鵻/9 ==================== Ojc鰶D槿 Downloaded 58641 bytes....Successfully installed Chart version 2.3 in ActivePerl 5.8.7.813.ppm> install GDGraph 靸8鉱 ==================== 绵<礊 Install 'GDTextUtil' version 0.86 in ActivePerl 5.8.7.813. 5o紁c鵦. ==================== 萦昽"疗80 Downloaded 19178 bytes....Successfully installed GDTextUtil version 0.86 in ActivePerl 5.8.7.813. 鸗%棘奘G輿 ==================== s幥塄h愜 Install 'GDGraph' version 1.43 in ActivePerl 5.8.7.813. 馃惖檏q ==================== 悋碀F?8 Downloaded 71764 bytes....Successfully installed GDGraph version 1.43 in ActivePerl 5.8.7.813.ppm> install PatchReader m瀖籭5
==================== 眕椴$8 Install 'PatchReader' version 0.9.4 in ActivePerl 5.8.7.813. 3Y禎鋔艎 ==================== 豄I憙鈹e Downloaded 9558 bytes....Successfully installed PatchReader version 0.9.4 in ActivePerl 5.8.7.813.ppm> install Net::LDAP 凭 弡>攘8 ==================== 鋥B1t Install 'Convert-ASN1' version 0.19 in ActivePerl 5.8.7.813. 郲8:{? ==================== 唲5T Downloaded 26326 bytes....Successfully installed Convert-ASN1 version 0.19 in ActivePerl 5.8.7.813. 駺,h耯w榎 ==================== 塈+. 9 Install 'perl-ldap' version 0.33 in ActivePerl 5.8.7.813. 5躵绒 ==================== N挢z栩 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. m怯 ==================== |瀉i鰰VW Downloaded 7693 bytes....Successfully installed Net-LDAP-Express version 0.11 in ActivePerl 5.8.7.813.ppm> |
三、配置IIS
1、打开IIS管理界面。新建一个虚拟路径,指向Bugzilla所在文件夹
0祾,- V铜鷢瞆 2、然后按应用程序设置按钮。增加一个映射,将.cgi文件映射到perl.exe。

点ADD
鶙莿甬鸔86 垸kj 这里特别注意,有些文档里写成: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。
斷g忢撀 蟧#+l蚐:Sy 4、OK! 到此IIS已配置完成,接下来才开始安装bugzilla了。
四、安装bugzilla
其实这一步不叫安装的,将你下的bugzilla解压缩到一个文件夹里,我放到了c:\根目录下。进入到DOS环境,运行命令:perl checksetup.pl 它会检查你有没有将所有的Modules安装成功,安装不成功的Modules会提示no found.。出现以下界面证明已安装成功:
C:\>cd bugzilla SJT}~嗉叇 C:\bugzilla>perl checksetup.pl 瀿弅 _q Checking perl modules ... q.淊w笟 Checking for AppConfig (v1.52) ok: found v1.55 Hq=5@ Checking for CGI (v2.93) ok: found v3.10 9p\I>圇 Checking for Data::Dumper (any) ok: found v2.121_04 (s瀯潝e Checking for Date::Format (v2.21) ok: found v2.22 M媆2U秕 Checking for DBI (v1.38) ok: found v1.48 壏F鼗轎趝 Checking for File::Spec (v0.84) ok: found v3.05 淞ZU顑 Checking for File::Temp (any) ok: found v0.16 艜$KO? Checking for Template (v2.08) ok: found v2.13
!O25櫾S Checking for Text::Wrap (v2001.0131) ok: found v2001.09293 *數蘚\ Checking for Mail::Mailer (v1.65) ok: found v1.67 *殖紛A鳻5 Checking for Storable (any) ok: found v2.13The following Perl modules are optional: 抜+ Checking for GD (v1.20) ok: found v2.16 諿+諐 Checking for Chart::Base (v1.0) ok: found v2.3 Awb梆c Checking for XML::Parser (any) ok: found v2.34 )癜纫 Checking for GD::Graph (any) ok: found v1.43 F>帛譫 Checking for GD::Text::Align (any) ok: found v1.18 0租牵>1渖K Checking for PatchReader (v0.9.4) ok: found v0.9.5 窺蒱z■ 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/ 聖$j You can add the repository with the following command: d惒詌兡褒 ppm rep add apache http://www.apache.org/dist/perl/win32-bin/ppms/Checking user setup ... ->y猩h This version of Bugzilla contains some variables that you may wantto change and adapt to your local settings. =O"鋁PT嚷 Please edit the file'./localconfig' and rerun checksetup. 2 ^洬哔" plThe following variables are new to localconfig since you last ranchecksetup. a&圥: pl: index_html cvsbin interdiffbin diffpath create_htaccesswebservergroup db_driver db_host db_pass db_sock db_check 槏衍鐤殤弛 C:\bugzilla> |
2、接下来,在bugzilla的目录下打开localconfig文件,找到以下几行并修改蓝色字体的内:
## How to access the SQL database:#$db_host = "localhost"; 顔㎎oky飺 # where is the database?$db_port = 3306; p鯏濆殊 # which port to use$db_name = "bugs"; 7'嚛缠7 廰 # name of the MySQL database$db_user = "bugs"; t嗪酟s鏭# # user to attach to the MySQL database W giM1嵺 ## Enter your database password here. It's normally advisable to specify f璫J|g移y # a password for your bugzilla database user. 呜Q8;茷睪Z # If you use apostrophe (') or a backslash (\) in your password, you'll 鷨:讹T_鏮 # need to escape it by preceding it with a \ character. (\') or (\\) 埧徵w2艮 #$db_pass = 'sockmonkey'; |
3、保存以后再次运行checksetup.pl。出现以下内容:别忘了记下输入的管理员的帐号和密码做为第一次登陆的用户和密码。
|
C:\bugzilla>perl D&{秗y checksetup.plChecking perl modules ... 羻?扇轓
Checking for AppConfig (v1.52) ok: found v1.55 aRf
I 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 (.峚藁`D Checking for DBI (v1.38) ok: found v1.48 -鎛3Oユ Checking for File::Spec (v0.84) ok: found v3.05 V=漌搞滎 Checking for File::Temp (any) ok: found v0.16 虄S%蚤 Checking for Template (v2.08) ok: found v2.13 )J7嬿-鄡 Checking for Text::Wrap (v2001.0131) ok: found v2001.09293 ~+!鍉,n Checking for Mail::Mailer (v1.65) ok: found v1.67 鷟嗵 Checking for Storable (any) ok: found v2.13The following Perl modules are optional: .J卌: p猩 Checking for GD (v1.20) ok: found v2.16Checking for Chart::Base (v1.0) ok: found v2.3 !嬖b頹 Checking for XML::Parser (any) ok: found v2.34 輯H.嵏錭 Checking for GD::Graph (any) ok: found v1.43 䲣=䓖-8 Checking for GD::Text::Align (any) ok: found v1.18 &2莲凈 Checking for PatchReader (v0.9.4) ok: found v0.9.5 隹糐="弊p Most ActivePerl modules are available at Apache's ppm repository. ^肁Z逰礏檉 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 ... 瓞/1 Creating data directory (./data) ... d.)臎3Uz Creating graphs directory... 岻呾tH驾 Creating .htaccess... 嵑塔劒' Creating Bugzilla/.htaccess... W忿t.閰! Creating ./data/.htaccess... j3uBn\G Creating ./template/.htaccess... 8 <?{ Creating ./data/webdot/.htaccess... 輗稜6` Precompiling templates ... 珿w&藬 Checking for MySQL Server (v3.23.41) ok: found v4.0.20a-debugCreating table user_group_map ... &2踵I绢) Creating table series_data ... )
襳1 Creating table longdescs ... 钌Bか>e Creating table dependencies ... (贘^怽a Creating table components ... 29炢a Creating table keywords ... )窹Z諹W Creating table cc ... 虔:靹7淂 Creating table duplicates ... H肋諫[,?蟀 Creating table groups ... F.淐楰c Creating table flagtypes ... ;耏y{冁+ Creating table profiles ... N[巑莐" Creating table products ... 颛@徯励 Creating table bugs_activity ... 霡Ofu峑 Creating table series_categories ... 5昨f]U~蕲 Creating table keyworddefs ... >+(蜡dg Creating table fielddefs ... 傢!RK*诞 Creating table group_control_map ... :溵wh*C鮉 Creating table profiles_activity ... _紋{痎 Creating table group_group_map ... 湳
$ Creating table user_series_map ... 翟{g鹶~/ Creating table bugs ... s簊v,舯 Creating table series ... 60祈塿璛J Creating table versions ... F6M =詏 Creating table flagexclusions ... ML3餝;碢( Creating table logincookies ... s &滑鼚5$ Creating table watch ... }x r蠗 Creating table bug_group_map ... 警E$梤 Creating table votes ... 袼襖靪 Creating table attachments ... g鉖祮 Creating table flags ... 47怅-Y宆 Creating table milestones ... `銵A纋X{馓 Creating table tokens ... 厦1b秉迼b Creating table flaginclusions ... 7皱3镬S# Creating table quips ... FU,7=坱 Creating table namedqueries ... +?lW Creating initial dummy product 'TestProduct' ... 跽)zjd Populating duplicates table... 锟錬D鑅# Creating duplicates directory... *昹X*缨 Migrating old chart data into database ... pE冿8|g= Adding group tweakparams ... S觻Z=d Adding group editusers ... _辎A1% Adding group creategroups ... s 赱}壓 Adding group editcomponents ... 蒜-権郊 Adding group editkeywords ... 4恝$RS巔 Adding group admin ... pZ茴黸6y Adding group editbugs ... 5煗蒁q 昃 Adding group canconfirm ... x?芉啙フ Looks like we don't have an administrator set up yet. %/@ Either this is yourfirst time using Bugzilla, or your administrator's privileges might haveaccidently been deleted.Enter the e-mail address of the administrator: byron@example.com (此将是默认超级用户)You entered 'byron@example.com'. uaJsk Is this correct? [Y/n] yEnter the real name of the administrator: Byron JonesEnter a password for the administrator account: beefPlease retype the password to verify: beef'byron@example.com' is now set up as an administrator account. 祮灟鱰鷅 C:\bugzilla>OK |
到此,bugzilla已安装完毕,接下来最后一步是配置邮箱了。 H峊)&趚 fed経跷 五、配置邮箱。 υ?睉 m嚤鰳靧栿> 由于bugzilla已经提供了内置的SMTP支持,如果是局域网内用的话只要安装一个windows 下的sendmail.exe,文件,将此文件放到和你的bugzilla同一目录下即可。如果发到其它邮件服务器中,可能还需要设置bugmail里的内容,(由于我是在局域网下配置的,这种方法没有试,请见谅)具体请参见bugzila的官方网站:http://www.bugzilla.org 瑓GwT; <!4撓-螈 六、登陆bugzilla 到这里,Bugzilla的安装就基本上搞定了。 .d 6m鳥H D謖臖!oJ 在IE浏览器地址栏里输入:http://localhost/ 登陆bugzilla,至此你就能使用等待以久的bugzill缺陷跟踪体系统了。 ~Q鶰$餓= rC.奬v5 经过漫长的安装过程,如果能和你共同分享成功的喜悦,可以给我留言哦,我的blog是:http://blog.51testing.com/chorry/ 打开登陆界面后,使用你输入的邮箱和密码就可以登陆了 4菁u鄙 賴菹鵖皝K 七、最后就是汉化bugzilla不过你不想汉化也没有问题。 V媷S "N 之勔CW砂蘛 将汉化包解压解压到cn文件夹,将整个文件目录 cn 拷贝至 Bugzilla 的子目录 template下;然后以管理员身份登录Bugzilla,点击页脚的 Parameters(系统参数设置)链接,将 languages 一项的值改为 cn,保存,则以后见到的Bugzilla页面就是汉语页面了。如果想返回英文界面,将 cn 改回 en 即可。为保证向后兼容,汉化的文件全部存为 UTF-8 格式。但不管你是否汉化Bugzilla,为强迫Bugzilla采用UTF-8来处理字符串,避免Bugzilla偶然出现的乱码,强烈建议大家将文件 安装目录>\Bugzilla\CGI.pm 的第55行改为 $self->charset('UTF-8')。汉化包的具体下载你可以在http://bugzilla.org/download.html 里找到相应的bugzilla汉化包。 &褄.z /虆鰔得H 八、一些bugzilla的参考网站Bugzilla官方网站 <毗A砒F 穟#觽彈 http://www.bugzilla.orgBugzilla汉化项目 n霐:霠Z http://sourceforge.net/projects/bugzilla-cnhttp://cosoft.org.cn/projects/bugzillchinese/Perl官方网站 !獴m楼 http://www.perl.comActivePerl官方网站 3_檘#迄譮 http://www.activestate.com/Products/ActivePerlMySQL官方网站 鷈剤?Nb椚 http://www.mysql.comFake Sendmait for Windows 敼"Z毰d http://www.glob.com.au/sendmail/Installing Bugzilla on Microsoft Windows 寐A罗Z昒 http://www.bugzilla.org/docs/win32install.html The Bugzilla Guide Q呩徸v/? http://www.bugzilla.org/docs/2.20/html Bugzilla windows安装红宝书 萤掤11 http://blog.fz0132.com/trackback.asp?tbID=654 q焓"'
|