码迷,mamicode.com
首页 > 其他好文 > 详细

ubuntu 系统中搭建bugzilla系统

时间:2014-07-31 17:09:37      阅读:348      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   http   color   使用   os   strong   

我在ubuntu上安装bugzilla系统部署,也是一头雾水,现在能做的也就是从网络上借鉴各种大牛的教程然后加上自己的总结和实际操作中遇到的困难从而记录下来写成博客。

Bugzilla简介
        
Bugzilla是一个共享的免费的产品缺陷记录及跟踪工具(Bug-Tracking System)。由Mozilla公司提供。创始人是Terry Weissman,开始时使用一种名为“TCL”的语言创建的,后用Perl语言实现,并作为Open source发布。它可以管理软件开发中缺陷的提交(new),修复(resolve),关闭(close)等整个生命周期。
Bugzilla特点
Bugzilla能够为你建立一个完善的bug跟踪体系,包括报告bug、查询bug记录并产生报表、处理解决bug、管理员系统初始化和设置四部分。Bugzilla具有如下特点:
1.基于Web方式,安装简单、运行方便快捷、管理安全。
2.有利于缺陷的清楚传达。本系统使用数据库进行管理,提供全面详尽的报告输入项,产生标准化的bug报告。 提供大量的分析选项和强大的查询匹配能力,能根据各种条件组合进行bug统计。当缺陷在它的生命周期中变化时,开发人员、测试人员、及管理人员将及时获得 动态的变化信息,允许你获取历史记录,并在检查缺陷的状态时参考这一记录。
3.系统灵活,强大的可配置能力。Bugzilla工具可以对软件产品设定不同的模块,并针对不同的模块设定开发人员和测试人员。这样可以实现提交报告时 自动发给指定的责任人,并可设定不同的小组,权限也可划分。设定不同的用户对bug记录的操作权限不同,可有效控制进行管理。允许设定不同的严重程度和优 先级。可以在缺陷的生命期中管理缺陷。从最初的报告到最后的解决,确保了缺陷不会被忽略。同时可以使注意力集中在优先级和严重程度高的缺陷上。
4.自动发送Email,通知相关人员。根据设定的不同责任人,自动发送最新的动态信息,有效的帮助测试人员和开发人员进行沟通。

 

如果大家想对bugzilla系统详细了解,可以去官方网站查看,毕竟官网的东西我觉得都是比较权威的。官方网址:

http://www.bugzilla.org/

 

我们从官方可以看到部署该系统的要求和方法:http://www.bugzilla.org/requirements/

Requirements

Operating System

To install and run Bugzilla on your server, the core requirement is to have Perl installed. This means that Bugzilla can be installed on any platform where Perl can be installed, including Windows, Linux, and Mac OS X. Linux is highly recommended and is our 1st-class citizen operating system.

Hardware

The hardware requirements depend heavily on the size of the user base and on the number of bugs in your database. For small teams (up to a few tens of users) with few bugs (up to a few thousands bugs), any good machine will do the job pretty well. The important part is to have enough RAM (4 GB or more recommended) and a fast processor (for instance, 3 GHz). Such hardware is pretty common nowadays. A harddisk with 50 GB of free space is large enough.

Larger teams with several thousands of users and several hundreds of thousands bugs need more hardware. To give you an idea, the Bugzilla installation at Mozilla uses 8 servers: 3 webheads (12 GB of RAM each), 1 master database (35 GB of RAM), 3 slave databases (35 GB of RAM each), and 1 email relay. Moreover, mod_perl is enabled for improved performance. Note that it is designed for very high concurrent access, which is quite unusual, so your requirements are probably lower than that.

Software

Bugzilla needs a database server, a web server, and Perl. In all recommendations below, "Bugzilla requires version X" must be understood as "Bugzilla requires version Xor newer". In all cases, the newer, the better, as newer releases have more bug fixes, are still supported and still get security fixes. If you install the mimimum version mentioned below, the risk is that this version will reach End Of Life pretty soon and so can be unsupported at any time.

Perl:
Bugzilla 4.4 and older require Perl 5.8.1 (or newer, see the previous paragraph), but Bugzilla 5.0 and newer will require Perl 5.10.1, and so we don‘t recommend Perl 5.8.x at this stage. Instead, you should install Perl 5.12 (thoughthis version already reached End Of Life) or newer, as these newer versions have some useful improvements which will make your life easier.
Database Server:
Bugzilla supports MySQL, PostgreSQL, Oracle and SQLite. We highly recommend MySQL and PostgreSQL, which have the best support from Bugzilla and are used daily by Bugzilla developers. Oracle hasseveral known issues and is a 2nd-class citizen. It should work decently in most cases, but may fail miserably in some cases too. SQLite is recommended for testing purposes only or for small teams.
If you install MySQL, version 5.0.15 is required by Bugzilla 4.x, but we highly recommend version 5.5 or newer. If you install PostgreSQL, version 8.3 is required.
Web Server:
Bugzilla has no minimum requirements for its web server. We recommend to install Apache 2.2, though Bugzilla works fine with IIS too (IIS 7 or higher recommended). If you install Apache and you want improved performances, you can enable its mod_perl module.

 

安装部署开始啦:

一:

1.需要安装perl,首先就要知道这个perl是什么,干什么用的。

perl的前身是Unix系统管理的一个工具,被用在无数的小任务里。后逐渐发展成为一种功能强大的程序设计语言,用作Web编程、数据库处理、XML处理以及系统管理;在完成这些工作时,同时仍能处理日常细小工作,这是它的设计初衷。Perl特别适合系统管理和Web编程。实际上已经被用在所有Unix(包括Linux)捆绑在一起作为标准部件发布,同时也用在Microsoft Windows和几乎其他所有操作系统。Perl 被称为“实用报表提取语言”(Practical Extraction and Report Language)。Perl是由拉里·沃尔(Larry Wall)设计的,并由他不断更新和维护的编程语言。简而言之,Perl像C一样强大,像awk、sed等脚本描述语言一样方便。

2.Perl一般是系统自带 ,如果没有或者版本不符合要求,请自行安装,或者
apt-get install perl
用Perl -v查看perl版本信息

perl的官方网址是:http://www.perl.org/

 

3.在命令终端输入命令:perl -v 查看安装的perl的版本:

bubuko.com,布布扣


我的perl的版本为:5.14.2网上说的安装版本要求为:5.8.1显然我的perl的版本已经够用了,但是我还是

用命令apt-get install perl更新了一下。

 

二:安装Mysql

 

在终端输入命令:mysql -v  如下图所示:

bubuko.com,布布扣 

按照提示继续输入命令:sudo apt-get install mysql-client-core-5.5  

 

安装命令:sudo apt-get install mysql-server(安装完成的最后,会让你输入root管理员的帐号密码,记住该密码,此root非用户组中的root,而是mysql数据库的root管理员根帐号)

 

三、Web服务器(apache2)

安装命令 : sudo apt-get install apache2

 

四、Mail Transfer Agent

 

安装命令: sudo apt-get install sendmail

 

五、下载bugzilla及安装Perl模块

下载链接:http://www.bugzilla.org/

将该文件解压缩到/var/www/目录下

sudo tar -C /var/www/ -xvf bugzilla-3.6.3.tar.gz

解压完毕,该目录下将会有一个名为bugzilla-3.6.3的目录,将该目录改名为bugzilla并切换到/var/www/bugzilla/目录

sudo mv bugzilla-3.6.3 bugzilla & cd /var/www/bugzilla/

在bugzilla目录下有一个checksetup.pl的文件,运行该文件

sudo perl checksetup.pl

运行完毕,会告诉你当前bugzilla还差那些perl模块需要安装,并且有提示安装命令。这里我们只需要安装必须的一些包就可以了,可选包可以不用安装。安装这些必须的包的命令一般为:

 /usr/bin/perl   install-module.pl --all

这句命令将安装bugzilla所需要的一系列perl模块,基本上运行完毕,安装bugzilla的前期准备工作都做的差不多了。
当然也存在一些安装不上的情况,这时要自己安装,我安装时候存在YAML和DateTime 安装不成功,通过如下命令安装或到cpan上下载需要的模块安装

sudo /usr/bin/perl install-module.pl YAML

sudo /usr/bin/perl install-module.pl DateTime

这句命令将安装bugzilla所需要的一系列perl模块,基本上运行完毕,安装bugzilla的前期准备工作都做的差不多了。

其实这个时候bugzilla差不多可以算是安装好一大半了,剩下的就是一些配置的问题了。


六、配置

1、mysql的配置。

       bugzilla需要用mysql数据库来管理bugs,其默认的数据库名字为bugs,默认的数据库管理员帐号为bugs,默认管理员密码为空,这些都是写在配置文件localconfig中的。所以我们需要添加一个bugs的mysql数据管理员用户,并创建一个名为bugs的数据库来保存bugzilla提交的bugs。

在终端输入:

mysql -u root -p(用mysql的root管理员登录mysql,以添加用户bugs),终端会提示输入密码,即之前安装mysql时的最后输入的root密码。

进入mysql界面后

grant all on *.* to bugs@localhost identified by ‘‘;flush privileges;别忘最后的‘;‘号),这样我们就创建好了mysql的用户bugs,供bugzilla使用。

最后创建bugs数据库文件。在mysql界面中输入:

CREATE DATABASE bugs;

2、apache2服务器的配置   

打开apache2的配置文件httpd.conf

sudo vi /etc/apache2/httpd.conf,在其中添加如下内容:

   <Directory "/var/www/bugzilla/">

        AddHandler cgi-script .cgi 

        Options +Indexes +ExecCGI +FollowSymLinks

        DirectoryIndex index.cgi

        AllowOverride None

        Order allow,deny

        Allow from all

    </Directory>

3、bugzilla的配置

修改/bugzilla/localconfig文件中的一句话:$webservergroup = ‘www-data‘;

这里为什么填www-data呢,这是由我们安装好的apache2的环境变数决定的,该变数存在文件/etc/apache2/envvars中,文件的内容如下:

# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data

这就是我们要填www-data的原因了,另外我们需要修改bugzilla目录的owner和groups。因为apache2环境变数决定是其是用www-data用户组来执行的。修改的命令为:sudo chgrp -R root.www-data bugzilla。


最后在终端执行下面的命令:sudo perl checksetup.pl,运行完毕bugzilla将会顺利的安装好,在安装的最后会让你输入bugzilla系统的管理员帐号和密码,这个必须记好了。

七、启动bugzilla

重启apache2服务器和mysqlserver

sudo /etc/init.d/apache2 restart

sudo /etc/init.d/mysql restart

bugzilla的环境算是基本上搭建好了,接下来打开firefox就可以用了。

在地址一栏输入http://localhost/bugzilla就可以看到bugzilla的首页了,截图如下:

bubuko.com,布布扣



后面大部分的内容是参考了博客http://blog.csdn.net/ocean181/article/details/7184961

 

 

 

 

 

 

 

ubuntu 系统中搭建bugzilla系统,布布扣,bubuko.com

ubuntu 系统中搭建bugzilla系统

标签:des   style   blog   http   color   使用   os   strong   

原文地址:http://blog.csdn.net/liuhaomatou/article/details/38312297

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!