RHEL4.3 x86_64下bugzilla简略配置指南

| | Comments (0) | TrackBacks (0)

系统为RHEL4 Update3 X86_64
Apache和MySQL都是系统默认安装
Apache 2.0.52
MySQL 4.1.12
bugzilla版本2.20
中文包2.20-cn
在bugzilla.sf.net下载
解压缩到/var/www/cgi-bin/
运行./checksetup.pl
验证perl环境
按照提示来下载所需要的包
方式有两种:
perl -MCPAN -e 'install "MODULE:NAME"'
这种方式第一次安装需要设定下载地点
第二种:
http://search.cpan.org下载相应的包
然后
perl Makefile.PL
make
make test
make install

然后成功完成./checksetup.pl
编辑./localconfig
设定
server'host 
database name 
MySQL username 
Password for MySQL

保存退出

因为cgi-bin目录的权限问题,需要在Apache conf中设置Alias /bugzilla /var/www/cgi-bin/bugzilla
否则css和js无法调用,同时显式声明

<Directory "/bugzilla">
Options Indexes FollowSylinks
Options +ExecCGI
AllowOverride Limit
Allow from from all
</Directory>

同时添加AddHandler cgi-script .cgi .pl
将Directory修改DirectoryIndex index.html index.htm index.php index.cgi
保存退出
apachectl -t测试Syntax
然后apachectl restart

测试http://localhost/bugzilla即可

中文化问题:
没有启用中文包的时候,MySQL编码是utf8-general-ci,浏览器编码为utf-8,插入中文偶有乱码,但是基本正常
按照中文包中manual设定,将Bugzilla/CGI.pm中第55行更改为:$self->charset('UTF-8')
结果为启用cn-utf8包时,界面正常,新建中文bug显示为乱码
启用cn-gb2312包时,界面乱码,新建中文bug显示正常
解决办法:
将CGI.pm中第55行更改为:$self->charset('GB2312')

/**
更改输出编码为GB2312
*/
更改MySQL数据库编码为:gb2312-general-ci
在bugzilla目录下执行: perl -pi -e "s/Content-Type\: text\/html/Content-Type\: text\/html\; charset=gb2312/i" *.cgi

*.pl
/***


/var/www/bugzilla目录下执行,它的作用是对当前目录下的所有cgi,perl程序中的
Content-Type: text/html
都替换为:
Content-Type: text/html; charset=gb2312
在bugzilla系统设置(parameters)中设定语言(languages)为cn_gb2312


0 引用回复

下列是引用此篇的博客地址: RHEL4.3 x86_64下bugzilla简略配置指南.

本篇引用回复地址: http://www.renwenyue.com/mt/mt-tb.cgi/22

添加评论

关于这篇文章

This page contains a single entry by suchasplus published on November 27, 2007 3:08 PM.

MySQL同步前的准备工作 was the previous entry in this blog.

subversion和TortoiseSVN配置笔记 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.