一.环境
系统 CentOS6.4x64最小化安装(事先安装好LNMP环境)
二.安装基础软件包
[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/
四.创建bugzilla数据库信息
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模块,并修改相关文件
[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 #修改为如下内容 $db_name = ‘bugzilla‘ $db_user = ‘bugzilla‘ $db_pass = ‘bugzilla‘ #最后配置相关信息 [root@rsync bugzilla-5.0.1]# ./checksetup.pl
六.配置nginx服务器
[root@rsync ~]# cp -r bugzilla-5.0.1 /data/bugzilla [root@rsync ~]# chown -R www.www /data/bugzilla #修改成nginx的用户权限 #安装spawn-fcgi [root@rsync ~]# yum install spawn-fcgi -y #创建站点配置文件 [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
故障汇总如下
故障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
本文出自 “ly36843运维” 博客,请务必保留此出处http://ly36843.blog.51cto.com/3120113/1696046
原文地址:http://ly36843.blog.51cto.com/3120113/1696046