ubuntu 系統中搭建bugzilla系統,ubuntubugzilla
我在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/
RequirementsOperating 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的版本:
我的perl的版本為:5.14.2網上說的安裝版本要求為:5.8.1顯然我的perl的版本已經夠用了,但是我還是
用命令apt-get install perl更新了一下。
二:安裝Mysql
在終端輸入命令:mysql -v 如所示:
按照提示繼續輸入命令: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的首頁了,如下:
後面大部分的內容是參考了部落格:http://blog.csdn.net/ocean181/article/details/7184961
教:ubuntu系統下安裝配置bugzilla所需的全部模組(bugzilla,perl,mysql,apache等)後,依然訪問失敗
運行
# ./checksetup.pl --check-modules
checksetup.pl 將列印出一份清單,列出需要安裝在您的電腦上的Perl模組,連同版本號碼。
沒有安裝的模組按照順序 用下面的命令安裝即可
# perl -MCPAN -e 'install "<modulename>"'
怎在虛擬機器下的ubuntu中使用bugzilla軟體