一.環(huán)境
系統(tǒng) CentOS6.4x64小化安裝(事先安裝好LNMP環(huán)境)
二.安裝基礎(chǔ)軟件包
[root@rsync ~]# yum install perl-CPAN -y
[root@rsync ~]# yum install mod_perl -y
[root@rsync ~]# yum install mod_perl-devel -y
[root@rsync ~]# yum install fcgi-perl -y
[root@rsync ~]# yum install fcgi-devel -y
三.安裝fcgiwrap
下載地址為https://codeload.github.com/gnosek/fcgiwrap/legacy.tar.gz/master
[root@rsync ~]# tar xf gnosek-fcgiwrap-1.1.0-18-g99c942c.tar.gz
[root@rsync ~]# cd gnosek-fcgiwrap-99c942c
[root@rsync gnosek-fcgiwrap-99c942c]# autoreconf -i
[root@rsync gnosek-fcgiwrap-99c942c]# ./configure
[root@rsync gnosek-fcgiwrap-99c942c]# make
cc -std=gnu99 -Wall -Wextra -Werror -pedantic -O2 -g3 fcgiwrap.c -lfcgi -o fcgiwrap
[root@rsync gnosek-fcgiwrap-99c942c]# cp fcgiwrap /usr/local/bin/
四.創(chuàng)建bugzilla數(shù)據(jù)庫(kù)信息
mysql> create database bugzilla;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on bugzilla.* TO 'bugzilla'@'localhost' IDENTIFIED BY 'bugzilla';
Query OK, 0 rows affected (0.03 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
五.修改bugzilla的配置文件
下載bugzilla源碼文件
[root@rsync ~]# wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.1.tar.gz
檢查perl模塊,并修改相關(guān)文件
[root@rsync ~]# tar xf bugzilla-5.0.1.tar.gz
[root@rsync ~]# cd bugzilla-5.0.1
#檢查缺少的安裝包
[root@rsync bugzilla-5.0.1]# ./checksetup.pl --check-modules
#安裝所有缺少的包
[root@rsync bugzilla-5.0.1]# perl install-module.pl --all
#生成配置文件
[root@rsync bugzilla-5.0.1]# ./checksetup.pl
[root@rsync bugzilla-5.0.1]# vim localconfig
#修改為如下內(nèi)容
$db_name = 'bugzilla'
$db_user = 'bugzilla'
$db_pass = 'bugzilla'
#后配置相關(guān)信息
[root@rsync bugzilla-5.0.1]# ./checksetup.pl
六.配置nginx服務(wù)器
[root@rsync ~]# cp -r bugzilla-5.0.1 /data/bugzilla
[root@rsync ~]# chown -R www.www /data/bugzilla #修改成nginx的用戶權(quán)限
#安裝spawn-fcgi
[root@rsync ~]# yum install spawn-fcgi -y
#創(chuàng)建站點(diǎn)配置文件
[root@rsync bugzilla]# cat /usr/local/nginx/conf/vhost/bugzilla.conf
server
{
listen 80;
server_name bug.keluofu.com;
index index.cgi index.html;
root /data/bugzilla;
location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*.(js|css)?$
{
expires 1h;
}
location ~ .*.cgi$ {
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.cgi;
include fastcgi.conf;
}
}
[root@rsync ~]# spawn-fcgi -f /usr/local/bin/fcgiwrap -a 127.0.0.1 -p 9001 -F 3 -P /var/run/fastcgi-c.pid
spawn-fcgi: child spawned successfully: PID: 113130
spawn-fcgi: child spawned successfully: PID: 113131
spawn-fcgi: child spawned successfully: PID: 113132
故障匯總?cè)缦?br />
故障1:
Can't locate parent.pm in @INC (@INC contains: . 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 Bugzilla/Constants.pm line 14.
BEGIN failed--compilation aborted at Bugzilla/Constants.pm line 14.
Compilation failed in require at ./checksetup.pl line 27.
BEGIN failed--compilation aborted at ./checksetup.pl line 27.
#解決如下
[root@rsync ~]# yum install perl-parent -y