CentOS6.4Bugzilla 配置指南
在進行CentOS安裝的時候,選擇了Desktop版本,並且默認安裝了Perl模塊和電子郵件服務器
1. Apache
CentOS6.4 桌面版本Apache是自帶的,如果不是自帶的建議使用yum install apache,否則後續的工作中會缺少模塊,安裝比較麻煩。
配置文件(etc/httpd/conf/httpd.conf)
1.(修改,根據具體情況而定)Listen8080
2.(默認) Userapache /Group apache 注意和bugzilla的配置對應
3.(默認) <Directory"/var/www/html"> 決定了bugzilla解壓位置
4.(添加cgi配置)
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +ExecCGI
DirectoryIndex index.cgi index.html
AllowOverride Limit FileInfo Indexes Options
</Directory>
服務管理(service httpdstart/stop/restart)
2. Mysql
可以在安裝系統的時候選擇安裝mysql,或者使用yum install mysql 然後 yum install mysql-server 安裝這樣的話配置的話會相對的容易一些。
配置文件(etc/my.cnf)
1.(添加)max_allowed_packet=12M
服務管理(service mysqldstart/stop/restart)
3. Perl
CentOS已經默認安裝了,這裏不再需要
4. Bugzilla
1. 將Bugzilla解壓到 /var/www/html中的bugzilla文件夾之中
2. 進入bugzilla目錄運行 ./checksetup.pl –check –modules 查看缺失模塊
因爲GD模塊需要預先安裝gd-devel模塊,所以這裏預先 yum -y install gd-devel;
使用下面的命令 mod-perl 模塊也是無法安裝的,所以這裏預先 yum -y install mod_perl;
運行 /usr/bin/perlinstall-module.pl –all(進行缺失模塊的安裝等價於 perl –MCPAN –e ‘install “Bundle:Bugzilla” ’) 安裝其他沒有安裝的模塊
3. 重新運行./checksetup.pl –check –modules 查看不能自動安裝的模塊進行手動安裝
***關於Apache:SizeLimit一直提示安裝未成功不清楚是什麼原因,但是這個模塊不安裝不影響使用。。。。。。
4. bugzilla 目錄下 運行checksetup.pl生成localconfig配置文件
5. 修改bugzilla配置文件 localconfig(/var/www/html/bugzilla/localconfig)
$webservergroup = 'apache';
$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugs';
$db_user = 'root';
$db_pass = '';
$db_port = 3306;
$db_check = 0;(注意否則模塊缺失情況下不會驗證通過)
6. mysql 建立bugs數據庫 create database bugs;
7. 運行 ./checksetup.pl 進行數據庫的建立,注意$db_user需要有權限操作數據庫
6. Bugzilla 漢化將漢化包拷貝只bugzilla/template即可
修改正確的漢化包地址:
http://pan.baidu.com/share/link?shareid=3225677985&uk=537939425
至此bugzilla安裝完畢,訪問 http://127.0.0.1:8080/bugzilla。
下面這個問題,第一次出現過,第二次沒有
Permission denied: exec of '/var/www/html/bugzilla/index.cgi' failed
[Thu Jun 06 15:20:04 2013] [error] [client 172.29.165.86] (13)Permission denied: exec of '/var/www/html/bugzilla/index.cgi' failed, referer: http://172.29.165.134/bugzilla/
[Thu Jun 06 15:20:04 2013] [error] [client 172.29.165.86] Premature end of script headers: index.cgi, referer: http://172.29.165.134/bugzilla/
解決方法:
[root@oracle html]# chcon -R -t httpd_sys_content_t /var/www/html/bugzilla/
OK~~~