Redhat 搭建bugzilla平臺


Redhat 搭建bugzilla步驟:


搭建本地yum(步驟略)


# yum install httpd

# yum install mod_perl

# yum install perl-LDAP

# yum install gcc


# service httpd start


# yum install mysql-server


# service mysqld start


# mysql -u root  (默認密碼爲空,登進後需改)


> use mysql;


> update user set password=password('123456') where user='root';  (真實環境切不可設爲123456)


> flush privileges;


> quit




bugzilla下載網址

https://www.bugzilla.org/download/


# tar zxfv bugzilla-4.5.2.tar.gz -C /var/www/html/


# cd /var/www/html/


# mv bugzilla-4.5.2  bugzilla


# chown -R aa bugzilla   (如果是用其它賬號執行需給下該賬號權限,修改apache運行賬號是修

改/etc/httpd/conf/httpd.conf   user處)


# mysql -u root -p123456


> create database bugzilla_DB default character set utf8 collate utf8_general_ci;


> grant all on bugzilla_DB.* to bugzilla@'localhost' identified by '123456';


> flush privileges;


> quit;


# /var/www/html/bugzilla/checksetup.pl  (check下是否缺失perl模塊,DBD-Oracle可無)


# cd /var/www/hmtl/bugzilla/      (install-module.pl在該目錄下)


# perl -MCPAN  -e shell


# cpan YAML


# perl install-module.pl --all   




# vi /var/www/html/bugzilla/localconfig



按a或i進入編輯模式


$db_name = 'bugzilla_DB';


$db_user = 'bugzilla';


$db_pass = '123456';


$db_port = 3306;



按Esc鍵退出編輯模式


:wq  (保存並退出)



# /var/www/html/bugzilla/checksetup.pl  


輸入郵箱和管理員賬號


輸入兩次密碼



如果出現下面輸出就說明沒問題了



# ./checksetup.pl 

* This is Bugzilla 4.4.9 on perl 5.10.1

* Running on Linux 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011


Checking perl modules...

Checking for               CGI.pm (v3.51)     ok: found v3.51 

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

Checking for             TimeDate (v2.23)     ok: found v2.24 

Checking for             DateTime (v0.28)     ok: found v0.53 

Checking for    DateTime-TimeZone (v0.71)     ok: found v1.08 

Checking for                  DBI (v1.54)     ok: found v1.609 

Checking for     Template-Toolkit (v2.22)     ok: found v2.26 

Checking for           Email-Send (v2.04)     ok: found v2.201 

Checking for           Email-MIME (v1.904)    ok: found v1.929 

Checking for                  URI (v1.37)     ok: found v1.67 

Checking for       List-MoreUtils (v0.32)     ok: found v0.412 

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


Checking available perl DBD modules...

Checking for               DBD-Pg (v2.7.0)    ok: found v2.15.1 

Checking for            DBD-mysql (v4.001)    ok: found v4.013 

Checking for           DBD-SQLite (v1.29)     ok: found v1.46 

Checking for           DBD-Oracle (v1.19)     not found 


The following Perl modules are optional:

Checking for                   GD (v1.20)     ok: found v2.53 

Checking for                Chart (v2.1.0)    ok: found v2.4.10 

Checking for          Template-GD (any)       ok: found v1.56 

Checking for           GDTextUtil (any)       ok: found v0.86 

Checking for              GDGraph (any)       ok: found v1.49 

Checking for           MIME-tools (v5.406)    ok: found v5.506 

Checking for          libwww-perl (any)       ok: found v5.833 

Checking for             XML-Twig (any)       ok: found v3.34 

Checking for          PatchReader (v0.9.6)    ok: found v0.9.6 

Checking for            perl-ldap (any)       ok: found v0.40 

Checking for          Authen-SASL (any)       ok: found v2.13 

Subroutine IO::Socket::INET6::sockaddr_in6 redefined at /usr/share/perl5/Exporter.pm line 67, <DATA> line 522.

 at /usr/share/perl5/IO/Socket/INET6.pm line 21.

Checking for         Net-SMTP-SSL (v1.01)     ok: found v1.02 

Checking for           RadiusPerl (any)       ok: found v0.24 

Checking for            SOAP-Lite (v0.712)    ok: found v1.14 

Checking for          XMLRPC-Lite (v0.712)    ok: found v0.717 

Checking for             JSON-RPC (any)       ok: found v1.06 

Checking for              JSON-XS (v2.0)      ok: found v3.01 

Checking for           Test-Taint (any)       ok: found v1.06 

Checking for          HTML-Parser (v3.40)     ok: found v3.64 

Checking for        HTML-Scrubber (any)       ok: found v0.14 

Checking for               Encode (v2.21)     ok: found v2.35 

Checking for        Encode-Detect (any)       ok: found v1.01 

Checking for          Email-Reply (any)       ok: found v1.203 

Checking for HTML-FormatText-WithLinks (v0.13)     ok: found v0.15 

Checking for          TheSchwartz (v1.07)     ok: found v1.12 

Checking for       Daemon-Generic (any)       ok: found v0.84 

Checking for           File-Slurp (v9999.13)  ok: found v9999.13 

Checking for             mod_perl (v1.999022) ok: found v2.000006 

Checking for     Apache-SizeLimit (v0.96)     ok: found v0.96 

Checking for        File-MimeInfo (any)       ok: found v0.27 

Checking for           IO-stringy (any)       ok: found v2.111 

Checking for          mod_headers (any)       ok 

Checking for          mod_expires (any)       ok 

Checking for              mod_env (any)       ok 

Reading ./localconfig...


OPTIONAL NOTE: If you want to be able to use the 'difference between two

patches' feature of Bugzilla (which requires the PatchReader Perl module

as well), you should install patchutils from:


    http://cyberelk.net/tim/patchutils/


Checking for            DBD-mysql (v4.001)    ok: found v4.013 

Checking for                MySQL (v5.0.15)   ok: found v5.1.52 


WARNING: You need to set the max_allowed_packet parameter in your MySQL

configuration to at least 3276750. Currently it is set to 1048576.

You can set this parameter in the [mysqld] section of your MySQL

configuration file.


Removing existing compiled templates...

Precompiling templates...done.

Fixing file permissions...


Now that you have installed Bugzilla, you should visit the 'Parameters'

page (linked in the footer of the Administrator account) to ensure it

is set up as you wish - this includes setting the 'urlbase' option to

the correct URL.

checksetup.pl complete.








# vi /etc/httpd/conf.d/bugzilla.conf


按a或i進入編輯模式



<Directory /var/www/html/bugzilla>

   AddHandler cgi-script .cgi

   Options +Indexes +ExecCGI

   DirectoryIndex index.cgi index.html

   AllowOverride Limit FileInfo Indexes Options

</Directory>



按Esc鍵退出編輯模式


:wq  (保存並退出)



# vi /etc/httpd/conf.d/perl.conf


按a或i進入編輯模式


PerlSwitches -w  (默認是註釋的)


PerlSwitches -T   (默認是註釋的)


PerlConfigRequire /var/www/html/bugzilla/mod_perl.pl  (新加的,用到Apache2::SizeLimit模塊)


按Esc鍵退出編輯模式


:wq  (保存並退出



# service httpd restart



訪問:


http://ip/bugzilla




注:


bugzilla和mysql在不同服務器:


需在bugzilla端執行如下命令(這是redhat或centos上httpd連接遠程mysql必須的):


# setsebool -P httpd_can_network_connect=1  (該命令在服務器重啓後依然起作用)



vi /etc/selinux/config 


按a或i進入編輯模式


SELINUX=disabled   (默認爲SELINUX=enforcing)


按Esc鍵退出編輯模式


:wq (保存並退出)



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章