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模块并检查安装
当然,这其中还涉及到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
由于缺少一些软件包,在安装过程中可能出现的问题和解决方案如下:
-
[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
-
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
-
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
-
[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/
原文链接:http://outofmemory.cn/wr/?u=http%3A%2F%2Fsmilejay.com%2F2014%2F08%2Finstall-bugzilla-on-centos%2F%3Futm_source%3Drss%26utm_medium%3Drss%26utm_campaign%3Dinstall-bugzilla-on-centos
(责任编辑:IT) |