一.环境
系统 CentOS6.4x64最小化安装(事先安装好LNMP环境)
二.安装基础软件包
[[email protected] ~]# yum install perl-CPAN -y [[email protected] ~]# yum install mod_perl -y [[email protected] ~]# yum install mod_perl-devel -y [[email protected] ~]# yum install fcgi-perl -y [[email protected] ~]# yum install fcgi-devel -y
三.安装fcgiwrap
下载地址为https://codeload.github.com/gnosek/fcgiwrap/legacy.tar.gz/master
[[email protected] ~]# tar xf gnosek-fcgiwrap-1.1.0-18-g99c942c.tar.gz [[email protected] ~]# cd gnosek-fcgiwrap-99c942c [[email protected] gnosek-fcgiwrap-99c942c]# autoreconf -i [[email protected] gnosek-fcgiwrap-99c942c]# ./configure [[email protected] gnosek-fcgiwrap-99c942c]# make cc -std=gnu99 -Wall -Wextra -Werror -pedantic -O2 -g3 fcgiwrap.c -lfcgi -o fcgiwrap [[email protected] 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源码文件
[[email protected] ~]# wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.1.tar.gz
检查perl模块,并修改相关文件
[[email protected] ~]# tar xf bugzilla-5.0.1.tar.gz [[email protected] ~]# cd bugzilla-5.0.1 #检查缺少的安装包 [[email protected] bugzilla-5.0.1]# ./checksetup.pl --check-modules #安装所有缺少的包 [[email protected] bugzilla-5.0.1]# perl install-module.pl --all #生成配置文件 [[email protected] bugzilla-5.0.1]# ./checksetup.pl [[email protected] bugzilla-5.0.1]# vim localconfig #修改为如下内容 $db_name = ‘bugzilla‘ $db_user = ‘bugzilla‘ $db_pass = ‘bugzilla‘ #最后配置相关信息 [[email protected] bugzilla-5.0.1]# ./checksetup.pl
六.配置nginx服务器
[[email protected] ~]# cp -r bugzilla-5.0.1 /data/bugzilla [[email protected] ~]# chown -R www.www /data/bugzilla #修改成nginx的用户权限 #安装spawn-fcgi [[email protected] ~]# yum install spawn-fcgi -y #创建站点配置文件 [[email protected] 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; } } [[email protected] ~]# 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. #解决如下 [[email protected] ~]# yum install perl-parent -y
时间: 2024-11-04 13:40:26