CentOS 6 安裝 bugzilla相關教程
本文系統內容:CentOS release 5.7 (Final) x64
一、主機名稱配置(非必須)
cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#::1 localhost6.localdomain6 localhost6
192.168.1.252 octest.test.com
192.168.1.252 test.com
二、apache安裝
1.yum install httpd -y
2.配置
根據自己需要變更連接埠號碼、虛擬機器主機、cgi支援等等。
a\如ServerName 192.168.1.252:8090
b\DirectoryIndex 加上 index.cgi(放第一位)
c\把#AddHandler cgi-script .cgi #去掉
d\注釋此如下四行
#<Directory />
# Options FollowSymLinks
# AllowOverride None
#</Directory>
e\
<Directory “/var/www/html/”>
Options Indexes FollowSymLinks
AllowOverride None
AllowOverride all
Options +ExecCGI +FollowSymLinks
DirectoryIndex index.cgi
Order allow,deny
Allow from all
</Directory>
f\/etc/init.d/httpd restart
三、mysql安裝
1.yum install mysql* -y
2.建立有許可權的mysql帳號
GRANT ALL ON bugs.* TO bugs@localhost IDENTIFIED BY ’123456′;
flush privileges
四、配置SMTP
新版本bugzilla內建有SMTP服務,只需開啟和設定就可以使用,不需要sendmail支援。
vim ../data/params
配置其中的
maintainer : test@test.com
mail_delivery_method : SMTP
mailfrom : test@test.com
smtpserver : smtp.test.com
smtp_username: test@test.com
smtp_password : **********
注意:maintainer、mailfrom必須相同!smtp_username郵箱必須是存在的真實的郵箱,smtp_password是郵箱的密碼(要與你所登陸郵箱時的密碼相同)!
五、安裝bugzilla所需的perl模組
我們這裡使用最新的bugzilla-4.2.3.tar.gz
:wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.2.3.tar.gz
tar zxvf bugzilla-4.2.3.tar.gz
cd bugzilla-4.2.3
perl checksetup.pl
檢測出來必須安裝的perl包,都編譯安裝或線上安裝或執行自動安裝。
AppConfig CGI Data::Format DBI DBD::mysql Template TimeDate
例如:
1,編譯安裝tar -zxvf AppConfig-1.56.tar.gz
cd AppConfig-1.56
perl Makefile.PL
make
make test
make install
2,線上安裝cpan Data::Format(force install Data::Format)
3,自動全部安裝/usr/bin/perl install-module.pl –all
安裝完成後再次檢測:
perl checksetup.pl
* This is Bugzilla 4.2.3 on perl 5.8.8
* Running on Linux 2.6.18-274.el5xen #1 SMP Fri Jul 22 05:31:07 EDT 2011
Checking perl modules…
Checking for CGI.pm (v3.21) ok: found v3.49
Checking for Digest-SHA (any) ok: found v5.72
Checking for TimeDate (v2.21) ok: found v2.24
Checking for DateTime (v0.28) ok: found v0.53
Checking for DateTime-TimeZone (v0.71) ok: found v1.50
Checking for DBI (v1.41) ok: found v1.622
Checking for Template-Toolkit (v2.22) ok: found v2.24
Checking for Email-Send (v2.00) ok: found v2.198
Checking for Email-MIME (v1.861) ok: found v1.911
Checking for Email-MIME-Encodings (v1.313) ok: found v1.313
Checking for Email-MIME-Modifier (v1.442) ok: found v1.911
Checking for URI (any) ok: found v1.60
Checking available perl DBD modules…
Checking for DBD-Pg (v1.45) ok: found v1.49
Checking for DBD-mysql (v4.00) ok: found v4.022
六、Bugzilla 配置
1,vim localconfig
#生產一個index.html檔案指向index.cgi
:$s/index_html=0/index_html=1/g
#mysql 使用者密碼,使用者預設和之前建的一致
$db_pass=’123456′
2,perl checksetup.pl
輸入管理員郵箱 bugadmin@test.com
輸入真實姓名:
輸入登入密碼:
提示完成。
3,到這裡面我們最好到mysql裡驗證是否建立了bugzilla所需要的表。
mysql -uroot -p -S /var/lib/mysql/mysql.sock
mysql> use bugs
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+—————————–+
| Tables_in_bugs |
+—————————–+
| attach_data |
| attachments |
| audit_log |
| bug_group_map |
| bug_see_also |
| bug_severity |
| bug_status |
| bug_tag |
| bugs |
| bugs_activity |
4,許可權添加
chown -R root.apache bugzilla/
chmod -R 777 bugzilla/
這樣bugzilla就安裝就完成了。
七、登入與訪問
http://192.168.1.252:8090/bugzilla
輸入管理帳號及密碼登入。