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 (保存并退出)