Bugzilla/Windows下Bugzilla的安装
安装前准备[ ]
Bugzilla在Windows下的安装颇为复杂。安装Bugzilla所需的软件都是开源的,都可以从它们的官方网站上下载到,下面把所需东西和下载网站罗列一下:
有两个简单的途径可以获得Bugzilla所需的Perl模块。一个是Bugzilla汉化项目整理的,收集的很全而且比较新,还有一个安装批处理程序,所以推荐大家用这个;
另外一个是Bugzilla的测试服务器,它也提供了完整的Perl模块集合,但是版本似乎比较老。第三条道路也是有的,但是需要自己去找然后再编译。
- Bugzilla
- Bugzilla汉化包:http://sourceforge.net/project/showfiles.php?group_id=75477
安装和配置MySQL[ ]
安装MySQL很简单,只要按照安装程序的提示一步一步的做就可以了。
接下来要配置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>
安装Perl及其模块[ ]
安装Perl也很容易,按照安装程序提示一步一步装就可以了。稍微复杂一点的是安装它的模块。不过有了Bugzilla汉化项目提供的批处理程序,这个步骤也非常简单了。大家只要记住一个简单的命令就可以了:
ppn install<module_name> ppn uninstall<module_name>
安装Bugzilla[ ]
把下载到压缩包解压到一个文件夹,然后运行Bugzilla的安装检查程序(CheckSetup.pl)。它会自动验证是不是安装了必须的软件。如果没有什么问题它会在Bugzilla目录里生成一个localconfig文件(没有扩展名)。
用文本编辑器打开localconfig文件,找到下面两段文字。$db_host表示服务器名称,$db_name表示数据库名称,$db_user表示登录用户名,$db_pass表示密码。修改这几个值并保存。
# # How to access the SQL database: # $db_host =‘localhost’; # where is the database? $db_name =‘bugs’; # name of the SQL database $db_user =‘bugs’; # user to attach to the SQL 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 (\) # (Far simpler just not to use those characters.) # $db_pass =‘bugs@agfa’;
再次运行Bugzilla的安装检查程序(CheckSetup.pl)。这时如果正常它将初始化数据库结构和Demo数据。可能会出现“Client does not support authentication protocol requested by server ……”错误信息。产生这个错误是因为MySQL 4.1及以后的版本使用了新的密码加密算法,而使用的Perl的DBD::MySql模块不够新,不支持新的加密算法。你可以采取两种方式来解决这个问题:一是使用新的DBD::MySql模块,不过需要自己编译;另一种是在MySQL中强制使用兼容老版本的密码加密算法:
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>
配置IIS[ ]
打开IIS管理界面。新建一个虚拟路径,指向Bugzilla所在文件夹。
然后按应用程序设置按钮。增加一个映射,将.cgi文件映射到perl.exe。配置如下:
<perl完整路径>\perl.exe -x<Bugzilla完整路径> -wT “%s” %s 例如: c:\perl\bin\perl.exe -xc:\bugzilla -wT “%s” %s
最后,将index.cgi加入到默认文档列表中。最好移到最前面,这样可以加快查询速度。如果不希望/不能把index.cgi加入到默认文档列表中,也可以在安装Bugzilla的时候,将localconfig文件中$index_html的值改为1。这样运行checksetup.pl时,就会生成一个index.html,自动重定向到index.cgi。
# # With the introduction of a configurable index page using the # template toolkit, Bugzilla’s main index page is now index.cgi. # Most web servers will allow you to use index.cgi as a directory # index, and many come preconfigured that way, but if yours doesn’t # then you’ll need an index.html file that provides redirection # to index.cgi. Setting $index_html to 1 below will allow # checksetup.pl to create one for you if it doesn’t exist. # NOTE: checksetup.pl will not replace an existing file, so if you # wish to have checksetup.pl create one for you, you must # make sure that index.html doesn’t already exist $index_html =1;
Bugzilla[ ]
在浏览器中打开http://localhost/bugzilla(根据你的具体情况而定)。如果你的Bugzilla是第一次使用,它会自动转向到Setup页面,按部就班的做就可以了。
汉化Bugzilla[ ]
最后要做的就是汉化了,不过你不想汉化也没有问题。将汉化包解压解压到cn文件夹,将整个文件目录cn拷贝至Bugzilla的子目录template下;然后以管理员身份登录Bugzilla,点击页脚的Parameters(系统参数设置)链接,将languages一项的值改为cn,保存,则以后见到的Bugzilla页面就是汉语页面了。如果想返回英文界面,将cn改回en即可。
为保证向后兼容,汉化的文件全部存为UTF-8格式。但不管你是否汉化Bugzilla,为强迫Bugzilla采用UTF-8来处理字符串,避免Bugzilla偶然出现的乱码,强烈建议大家将文件<Bugzilla安装目录>\Bugzilla\CGI.pm的第55行改为$self->charset(’UTF-8‘)。
参考来源[ ]
http://www.51testing.com/?uid-92598-action-viewspace-itemid-4693
Bugzilla使用手册导航 | ||||
---|---|---|---|---|
|