版本

centos6.5

bugzilla4.2.7


bugzilla4.4.2centos6.5下安装时DateTimeDateTime-TimeZone两个必要的perl插件可以安装成功但在checksetup.pl检查时不成功。后来发现可能是由于运行cpan的权限问题,详见备注1




配置mysql

mysql_install_db--basedir=/home/bugzilla/mysql --datadir=/home/bugzilla/mysql/data--user=bugzilla



配置/etc/my.cnf

[mysqld]

datadir=/home/bugzilla/mysql/data

socket=/tmp/mysql.sock

user=bugzilla

log-error=/home/bugzilla/mysql/logs/mysqld.log

pid-file=/home/bugzilla/mysqld/mysqld.pid

lc-messages-dir=/home/bugzilla/mysql/share/english


启动mysql

mysqld &


创建数据库

create database bugs;

创建用户

create user bugs;

为用户授权

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY 'root' WITH GRANT OPTION;


GRANT ALL PRIVILEGES ON *.* TO 'bugs'@'%'IDENTIFIED BY 'bugs' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO'bugs'@'localhost' IDENTIFIED BY 'bugs' WITH GRANT OPTION;

flush privileges;


编译安装apache


2)编译并安装apr-1.5.0

cd apr-1.5.0

./configure--prefix=/home/bugzilla/local/apr

make

make install


3)编译并安装libtool-2.4.2

cd libtool-2.4.2

./configure--prefix=/home/bugzilla/local/libtool

make

make install


4)编译并安装apr-util-1.5.3

cd apr-util-1.5.3

./configure--prefix=/home/bugzilla/local/apr-util--with-apr=/home/bugzilla/local/apr/bin/apr-1-config

make

make install


5)编译并安装pcre-8.34

cd pcre-8.34

./configure--prefix=/home/bugzilla/local/pcre

make

make install


6)编译并安装openssl-1.0.1f

tar -zxvf openssl-1.0.1f.tar.gz

cd openssl-1.0.1f

./config -fPIC--prefix=/home/bugzilla/local/openssl/ enable-shared

make

make install


7)编译并安装httpd-2.4.7

cd httpd-2.4.7

./configure--prefix=/home/bugzilla/local/apache --enable-so --enable-rewrite --enable-dav--enable-cgi --enable-dav-fs --enable-mnaintainet-mode--with-apr=/home/bugzilla/local/apr --with-apr-util=/home/bugzilla/local/apr-util--with-pcre=/home/bugzilla/local/pcre--with-auth-digest --enable-ssl--with-ssl=/home/bugzilla/local/openssl

make

make install



安装perl CPAN

下载CPAN-2.00.tar.gz

tar zxvf CPAN-2.00.tar.gz

cd CPAN-2.00

perl Makefile.PL

make

make install


rpm 安装

um -y install perl-CPAN


perl-MCPAN -e 'install "Bundle::Apache2"'

perl-MCPAN -e 'install "Bundle::Bugzilla"'


配置CPAN 添加 urllist,可用url可以在http://search.cpan.org/找到

cpan

cpan[4]> o conf urllist unshifthttp://mirrors.sohu.com/CPAN/

o conf urllist unshift http://mirrors.hust.edu.cn/CPAN/

cpan[5]> o conf commit


o conf 命令

o conf KEYSHIFT|UNSHIFT|PUSH|POP|SPLICE|LIST


安装bugzilla所需的perl modules

运行checksetup.pl程序

>perl checksetup.pl

显示bugzilla依赖modules的安装情况

执行/usr/bin/perl install-module.pl --all 安装所需的module

在次运行checksetup.pl程序,没有安装成功的包按照提示手工安装。


* This is Bugzilla 4.2.7 on perl 5.10.1

* Running on Linux 2.6.32-431.el6.x86_64 #1SMP Fri Nov 22 03:15:09 UTC 2013


Checking perl modules...

Checking forCGI.pm (v3.51) ok: found v3.63

Checking forDigest-SHA (any)ok: found v5.47

Checking forTimeDate (v2.21)ok: found v2.24

Checking forDateTime (v0.28)ok: found v1.07

Checking forDateTime-TimeZone (v0.71)ok: found v1.64

Checking forDBI (v1.41)ok: found v1.631

Checking forTemplate-Toolkit (v2.22)ok: found v2.25

Checking forEmail-Send (v2.00)ok: found v2.199

Checking forEmail-MIME (v1.904)ok: found v1.926

Checking forURI (v1.37)ok: found v1.60

Checking forList-MoreUtils (v0.22)ok: found v0.33

Checking forMath-Random-ISAAC (v1.0.1)ok: found v1.004


Checking available perl DBD modules...

Checking forDBD-mysql (v4.001)ok: found v4.026


上述列表中的主要module安装成功后,checksetup.pl会生成localconfig文件。


备注1:解决DateTime DateTime-TimeZone 安装不成功问题。

先用用操作系统自带的perl-DateTime rpm包,在安装DateTime-TimeZone

yuminstall perl-DateTime

root用户执行 perl-MCPAN -e 'install DateTime::TimeZone' #自动安装包括依赖包,root权限执行很重要,非root用户执行以后checksetup.pl脚本始终找不到DateTime::TimeZone,有经验的朋友可以帮忙解释一下,本人对perl并不熟悉


配置localconfig文件

$webservergroup = 'bugzilla';#web服务器启动的操作系统用户组

$db_driver = 'mysql';#数据库类型

$db_name = 'bugs';

$db_user = 'bugs';

$db_pass = 'bugs';

$db_port = 3306;



配置apachehttp.conf文件

#Listen 12.34.56.78:80

Listen 192.168.3.16:8001 #配置监听及端口号


LoadModule cgid_module modules/mod_cgid.so 配置mod_cgid模块可用


#配置bugzilla的访问目录及权限

Alias /bugs /home/bugzilla/bugzilla-4.2.7

AddHandler cgi-script .cgi

Options +FollowSymLinks +Indexes +Includes+ExecCGI

#AllowOverride none

DirectoryIndex index.cgi index.html

Order allow,deny

Allow from all

AllowOverride Limit FileInfo IndexesOptions

Require all granted


启动apache

>apachectl start


访问http://ipaddress:port/bugs