centos5.5 에서 bugzilla 설치하기
* mysql & apache 는 미리 설치한다.
1. 설치할 폴더로 이동
cd /usr/local
2. bugzilla 다운
다운 받을 땐 무조건 최신버전을 받아서 테스터가 되기보다는 stable버전으로 다운받는편이 낫다.
현재는 4.0.2가 최신버전이다.
3. 압축해제
tar -zxvf bugzilla-4.0.2.tar.gz
4. 폴더명 변경
mv bugzilla-4.0.2.tar.gz bugzilla
5. 폴더이동
cd bugzilla
6. 설치할 라이브러리 확인
./checksetup.pl --check
아래와 같은 실행 결과가 나온다.
[root@localhost bugzilla]# ./checksetup.pl --check
* This is Bugzilla 3.6.6 on perl 5.8.8
* Running on Linux 2.6.18-194.17.1.el5 #1 SMP Wed Sep 29 12:50:31 EDT 2010
Checking perl modules...
Checking for CGI.pm (v3.51) ok: found v3.55
Checking for Digest-SHA (any) ok: found v5.62
Checking for TimeDate (v2.21) not found
Checking for DateTime (v0.28) ok: found v0.70
Checking for DateTime-TimeZone (v0.71) ok: found v1.37
Checking for DBI (v1.41) ok: found v1.52
Checking for Template-Toolkit (v2.22) not found
Checking for Email-Send (v2.00) not found
Checking for Email-MIME (v1.861) not found
Checking for Email-MIME-Encodings (v1.313) not found
Checking for Email-MIME-Modifier (v1.442) not found
Checking for URI (any) ok: found v1.35
Checking available perl DBD modules...
Checking for DBD-Pg (v1.45) not found
Checking for DBD-mysql (v4.00) found v3.0007
Checking for DBD-Oracle (v1.19) not found
The following Perl modules are optional:
Checking for GD (v1.20) not found
Checking for Chart (v2.1) not found
Checking for Template-GD (any) not found
Checking for GDTextUtil (any) not found
Checking for GDGraph (any) not found
Checking for XML-Twig (any) not found
Checking for MIME-tools (v5.406) not found
Checking for libwww-perl (any) ok: found v2.033
Checking for PatchReader (v0.9.4) not found
Checking for perl-ldap (any) not found
Checking for Authen-SASL (any) not found
Checking for RadiusPerl (any) not found
Checking for SOAP-Lite (v0.710.06) not found
Checking for JSON-RPC (any) not found
Checking for Test-Taint (any) not found
Checking for HTML-Parser (v3.40) ok: found v3.55
Checking for HTML-Scrubber (any) not found
Checking for Email-MIME-Attachment-Stripper (any) not found
Checking for Email-Reply (any) not found
Checking for TheSchwartz (any) not found
Checking for Daemon-Generic (any) not found
Checking for mod_perl (v1.999022) ok: found v2.000004
Checking for Math-Random-Secure (v0.05) not found
***********************************************************************
* REQUIRED MODULES *
***********************************************************************
* Bugzilla requires you to install some Perl modules which are either *
* missing from your system, or the version on your system is too old. *
* See below for commands to install these modules. *
***********************************************************************
* DATABASE ACCESS *
***********************************************************************
* In order to access your database, Bugzilla requires that the *
* correct "DBD" module be installed for the database that you are *
* running. See below for the correct command to run to install the *
* appropriate module for your database. *
***********************************************************************
* OPTIONAL MODULES *
***********************************************************************
* Certain Perl modules are not required by Bugzilla, but by *
* installing the latest version you gain access to additional *
* features. *
* *
* The optional modules you do not have installed are listed below, *
* with the name of the feature they enable. Below that table are the *
* commands to install each module. *
***********************************************************************
* MODULE NAME * ENABLES FEATURE(S) *
***********************************************************************
* GD * Graphical Reports, New Charts, Old Charts *
* Chart * New Charts, Old Charts *
* Template-GD * Graphical Reports *
* GDTextUtil * Graphical Reports *
* GDGraph * Graphical Reports *
* XML-Twig * Move Bugs Between Installations, Automatic Update Notifications *
* MIME-tools * Move Bugs Between Installations *
* PatchReader * Patch Viewer *
* perl-ldap * LDAP Authentication *
* Authen-SASL * SMTP Authentication *
* RadiusPerl * RADIUS Authentication *
* SOAP-Lite * XML-RPC Interface *
* JSON-RPC * JSON-RPC Interface *
* Test-Taint * JSON-RPC Interface, XML-RPC Interface *
* HTML-Scrubber * More HTML in Product/Group Descriptions *
* Email-MIME-Attachment-Stripper * Inbound Email *
* Email-Reply * Inbound Email *
* TheSchwartz * Mail Queueing *
* Daemon-Generic * Mail Queueing *
* Math-Random-Secure * Improve cookie and token security *
***********************************************************************
COMMANDS TO INSTALL OPTIONAL MODULES:
GD: /usr/bin/perl install-module.pl GD
Chart: /usr/bin/perl install-module.pl Chart::Lines
Template-GD: /usr/bin/perl install-module.pl Template::Plugin::GD::Image
GDTextUtil: /usr/bin/perl install-module.pl GD::Text
GDGraph: /usr/bin/perl install-module.pl GD::Graph
XML-Twig: /usr/bin/perl install-module.pl XML::Twig
MIME-tools: /usr/bin/perl install-module.pl MIME::Parser
PatchReader: /usr/bin/perl install-module.pl PatchReader
perl-ldap: /usr/bin/perl install-module.pl Net::LDAP
Authen-SASL: /usr/bin/perl install-module.pl Authen::SASL
RadiusPerl: /usr/bin/perl install-module.pl Authen::Radius
SOAP-Lite: /usr/bin/perl install-module.pl SOAP::Lite
JSON-RPC: /usr/bin/perl install-module.pl JSON::RPC
Test-Taint: /usr/bin/perl install-module.pl Test::Taint
HTML-Scrubber: /usr/bin/perl install-module.pl HTML::Scrubber
Email-MIME-Attachment-Stripper: /usr/bin/perl install-module.pl Email::MIME::Attachment::Stripper
Email-Reply: /usr/bin/perl install-module.pl Email::Reply
TheSchwartz: /usr/bin/perl install-module.pl TheSchwartz
Daemon-Generic: /usr/bin/perl install-module.pl Daemon::Generic
Math-Random-Secure: /usr/bin/perl install-module.pl Math::Random::Secure
YOU MUST RUN ONE OF THE FOLLOWING COMMANDS (depending on which database
you use):
PostgreSQL: /usr/bin/perl install-module.pl DBD::Pg
MySQL: /usr/bin/perl install-module.pl DBD::mysql
Oracle: /usr/bin/perl install-module.pl DBD::Oracle
COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands
and then re-run this script):
/usr/bin/perl install-module.pl Date::Format
/usr/bin/perl install-module.pl Template
/usr/bin/perl install-module.pl Email::Send
/usr/bin/perl install-module.pl Email::MIME
/usr/bin/perl install-module.pl Email::MIME::Encodings
/usr/bin/perl install-module.pl Email::MIME::Modifier
To attempt an automatic install of every required and optional module
with one command, do:
/usr/bin/perl install-module.pl --all
*** Installation aborted. Read the messages above. ***
7. 라이브러리 설치
[root@localhost bugzilla]#/usr/bin/perl install-module.pl --all 를 통해서 전체적으로 한번에 설치할수 있다.
하나씩 설치를 하며 메세지를 확인하는 편이 오류가 발생됬을때 대처하기 쉽다곤 하지만,
그냥
[root@localhost bugzilla]#/usr/bin/perl install-module.pl --all
를 통해서 한번에 설치하는 편이 낫다. 나같은 경우는 하나씩 설치하다가 뜻하지 않은 오류가 발생되어 개고생했다.
COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands
and then re-run this script):
아래에 있는 모듈을 필수 모듈이니 꼭 설치가 되어 bugzilla를 실행할수 있다.
따로 설치 할 경우 아래와 같은 오류가 발생할수 있다.
[root@localhost bugzilla-3.6.6]# /usr/bin/perl install-module.pl Date::Format
Checking for CPAN (v1.81) ok: found v1.98
Checking for YAML (any) ok: found v0.73
Checking for ExtUtils-MakeMaker (v6.31) ok: found v6.59
Reading '/root/.cpan/Metadata'
Database was generated on Sun, 18 Sep 2011 05:28:00 GMT
Installing Date::Format version 2.24...
Running install for module 'Date::Format'
Running make for G/GB/GBARR/TimeDate-1.20.tar.gz
Fetching with LWP:
'glob' trapped by operation mask at (eval 106) line 1.
at /usr/local/bugzilla-3.6.6/lib/CPAN/Distribution.pm line 1469
CPAN::Distribution::CHECKSUM_check_file('CPAN::Distribution=HASH(0xd975740)', '/root/.cpan/sourc e/authors/id/G/GB/GBARR/CHECKSUMS') called at /usr/local/bugzilla-3.6.6/lib/CPAN/Distribution.pm line 14 03
CPAN::Distribution::verifyCHECKSUM('CPAN::Distribution=HASH(0xd975740)') called at /usr/local/bu gzilla-3.6.6/lib/CPAN/Distribution.pm line 406
CPAN::Distribution::check_integrity('CPAN::Distribution=HASH(0xd975740)') called at /usr/local/b ugzilla-3.6.6/lib/CPAN/Distribution.pm line 349
CPAN::Distribution::get('CPAN::Distribution=HASH(0xd975740)') called at /usr/local/bugzilla-3.6. 6/lib/CPAN/Distribution.pm line 1754
CPAN::Distribution::make('CPAN::Distribution=HASH(0xd975740)') called at /usr/local/bugzilla-3.6 .6/lib/CPAN/Distribution.pm line 3067
CPAN::Distribution::test('CPAN::Distribution=HASH(0xd975740)') called at /usr/local/bugzilla-3.6 .6/lib/CPAN/Distribution.pm line 3469
CPAN::Distribution::install('CPAN::Distribution=HASH(0xd975740)') called at /usr/local/bugzilla- 3.6.6/lib/CPAN/Module.pm line 479
eval {...} called at /usr/local/bugzilla-3.6.6/lib/CPAN/Module.pm line 478
CPAN::Module::rematein('CPAN::Module=HASH(0xc332ec0)', 'install') called at /usr/local/bugzilla- 3.6.6/lib/CPAN/Module.pm line 578
CPAN::Module::install('CPAN::Module=HASH(0xc332ec0)') called at /usr/local/bugzilla-3.6.6/lib/CP AN/Shell.pm line 1797
CPAN::Shell::rematein('CPAN::Shell', 'notest', 'install', 'Date::Format') called at /usr/local/b ugzilla-3.6.6/lib/CPAN/Shell.pm line 1977
CPAN::Shell::__ANON__('CPAN::Shell', 'install', 'Date::Format') called at /usr/local/bugzilla-3. 6.6/Bugzilla/Install/CPAN.pm line 179
Bugzilla::Install::CPAN::install_module('Date::Format') called at install-module.pl line 106
이럴 때는 당황하지 말고,
[root@localhost bugzilla]# find / -name ".cpan" -print
명령어를 사용해 cpan의 설치 경로를 검색후
아래의 명령어로 삭제한다.
[root@localhost bugzilla]# rm -rf /root/.cpan
구글링을 아무리 해도 나오지 안던 에러 였는데 의외로 야후에서 오류 해결방법을 찾을수 있었다.
8. mysql 설정
[root@localhost bugzilla]# mysql -uroot -p
로 mysql 접속
use mysql 로 데이타베이스 이동후 아래의 명령어 4개를 날린다.
1) 사용자 생성
INSERT INTO user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv,
Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv) VALUES ('%', 'bugs', password('123456'), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
2) db 계정생성
INSERT INTO db VALUES ('%', 'bugs', 'bugs', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
3) bugs 사용자 접속할수 있도록 해주는 쿼리
delete from user where User='';
4) 위의 명령어 mysql 적용
FLUSH PRIVILEGES;
9. localconfig 파일 수정
[root@localhost bugzilla]# vi ./localconfig
수정해야 할 항목은 아래와 같이 설정해준다.
8.에서 설정한 내용과 동일하게 설정해줌
$webservergroup = 'root'; <=== apache 폴더의 그룹명과 같게 해준다.
$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugs';
$db_user = 'bugs';
$db_pass = '123456';
$db_port = 3306;
10. bugzilla 데이타 베이스 생성
[root@localhost bugzilla]# ./checksetup.pl
11. 아파치 설정
apache httpd.conf 파일의 가장 하단에를 추가한다.
PerlSwitches -l/usr/local/bugzilla -l/usr/local/bugzilla/lib -w -T
perlConfigRequire /usr/local/mod_perl.pl
12. 아파치 재시작
service httpd restart
13. 벅질라 접속