CentOS 下如何搭建Bug管理系統 Bugzilla

來源:互聯網
上載者:User

Bugzilla作為最好的Bug管理系統之一,它是主要用Perl編寫的開源軟體,在很多公司或組織都在使用Bugzilla,如:RedHat、Linux kernel等。
我也在公司使用Bugzilla管理Bug,最近在對Bugzilla進行定製化,也寫一下Bugzilla的安裝過程吧。
本文記錄的是在CentOS系統上使用Nginx做Web伺服器安裝Bugzilla的過程,另外,有些細節不寫了,寫一些主要的過程,後面的參考資料裡面也有不錯的文檔。

1. 下載Bugzilla原始碼,這個不多說了。

2. 安裝一些必要的軟體包:

yum install perl-CPAN
yum install mod_perl
yum install mod_perl-devel
yum install fcgi-perl

3. 安裝必要的perl模組並檢查安裝

cd bugzilla
perl install-module.pl --all
./checksetup.pl

當然,這其中還涉及到MySQL的使用者名稱、密碼之類的互動式輸入配置。

4. 啟動fastcgi wrapper程式,從這裡(fastcgi-wrapper)下載,並運行即可。

5. 修改Nginx設定檔,使其可以正常處理perl CGI程式,我的一個修改如下:

 代碼如下 複製代碼
diff --git a/nginx.conf b/nginx.conf
index 8730c99..114d9d8 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -83,10 +83,20 @@ http {
 #       config_apps_end
 
          location / {
            if ( !-f $request_filename ) {
                proxy_pass          http://jboss8080;
                 break;
            }
            root   /usr/local/nginx/html;
            index  index.html index.htm index.cgi index.pl;
           # if ( !-f $request_filename ) {
           #     proxy_pass          http://jboss8080;
           #      break;
           # }
        }

        location ~ .pl|cgi$ {
            root           html;
            fastcgi_pass   127.0.0.1:8999;
            fastcgi_index  index.pl;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
         }
 
         error_page    500 502 503 504  /50x.html;




6. 最後,改好bugzilla目錄的許可權,並重啟nginx即可,如:

cd /usr/local/nginx/
chown nobody:nobody html -R
service nginx restart

由於缺少一些軟體包,在安裝過程中可能出現的問題和解決方案如下:

1. [root@jay-centos html]# perl install-module.pl –all
Can’t locate CPAN.pm in @INC (@INC contains: /usr/local/nginx/html/lib/x86_64-linux-thread-multi /usr/local/nginx/html/lib /usr/local/nginx/html /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/nginx/html/Bugzilla/Install/CPAN.pm line 24.
BEGIN failed–compilation aborted at /usr/local/nginx/html/Bugzilla/Install/CPAN.pm line 24.
Compilation failed in require at install-module.pl line 21.
BEGIN failed–compilation aborted at install-module.pl line 21.
解決方案:yum install perl-CPAN

2. Can’t find mod_perl installed
The error was: Can’t locate mod_perl2.pm in @INC (@INC contains: /usr/local/nginx/html/lib/x86_64-linux-thread-multi /usr/local/nginx/html/lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 149.
解決方案:yum install mod_perl

3. Can’t locate ModPerl/MM.pm in @INC (@INC contains: /usr/local/nginx/html/lib/x86_64-linux-thread-multi /usr/local/nginx/html/lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 60.
解決方案:yum install mod_perl-devel

4. [root@jay-centos html]# ./fastcgi-wrapper
Can’t locate FCGI.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./fastcgi-wrapper line 3.
BEGIN failed–compilation aborted at ./fastcgi-wrapper line 3.
解決方案:yum install fcgi-perl

參考資料:

http://www.bugzilla.org/docs/4.4/en/html/installation.html

http://blog.hyperexpert.com/how-to-install-the-latest-bugzilla-on-centos/

http://blog.codylab.com/install-bugzilla-centos-6-3-step-step/

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.