準備工作:
覈實版本
perl(5.6 or above)、mysql(3.23.41 or above)、sendmail(8.7 or above),
運行如下命令看版本
perl –version
mysql –version
看/etc/mail/sendmail.cf文件
一, 安裝mysql
1,卸載舊版本mysql
rpm –qa|grep mysql 得到現有版本是3.23
rpm -e mysql-3.23.58-16.RHEL3.1
提示錯誤消息 :
Failed dependencies:
libmysqlclient.so.10 is needed by (installed) perl-DBD-MySQL-2.1021-3
libmysqlclient.so.10 is needed by (installed) mod_auth_mysql-20030510-2.ent
libmysqlclient.so.10 is needed by (installed) php-mysql-4.3.2-23.ent
libmysqlclient.so.10 is needed by (installed) libdbi-dbd-mysql-0.6.5-5
libmysqlclient.so.10 is needed by (installed) MySQL-python-0.9.1-6
libmysqlclient.so.10 is needed by (installed) MyODBC-2.50.39-12.1
libmysqlclient.so.10 is needed by (installed) qt-MySQL-3.1.2-13.4
mysql = 3.23.58 is needed by (installed) mysql-bench-3.23.58-16.RHEL3.1
mysql = 3.23.58 is needed by (installed) mysql-devel-3.23.58-16.RHEL3.1
mysql is needed by (installed) MySQL-python-0.9.1-6
須要同時卸載這些依賴文件,使用如下辦法:
rpm -e mysql-3.23.58-16.RHEL3.1 perl-DBD-MySQL-2.1021-3 mod_auth_mysql-20030510-2.ent php-mysql-4.3.2-23.ent libdbi-dbd-mysql-0.6.5-5 MySQL-python-0.9.1-6 MyODBC-2.50.39-12.1 qt-MySQL-3.1.2-13.4 mysql-devel-3.23.58-16.RHEL3.1 MySQL-python-0.9.1-6 mysql-bench-3.23.58-16.RHEL3.1
2,下載安裝mysql
選擇一個mysql版本下載,這裏選擇4.1
http://dev.mysql.com/downloads/mysql/4.1.html
選擇Red Hat Enterprise Linux 4 RPM (x86) downloads
下載server client
MySQL-server-standard-4.1.21-0.rhel4.i386.rpm
MySQL-server-standard-4.1.21-0.rhel4.i386.rpm
Rpm –ivh MySQL-server-standard-4.1.21-0.rhel4.i386.rpm
Rpm –ivh MySQL-server-standard-4.1.21-0.rhel4.i386.rpm
3,設置mysql
設置root密碼:
mysqladmin -u root password aa:
登陸mysql server:
mysql –u root –p ,回車
然後輸入密碼 aa
建立新數據庫:bugs,建立用戶,並授權操做
mysql>create database bugs;
mysql> GRANT SELECT, INSERT,UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES,CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY '$db_pass';
mysql> FLUSH PRIVILEGES;
mysql>quit
二,安裝bugzilla
在http://www.bugzilla.org/download/ 下載bugzilla
選擇2。22版本。
下載相關文件,如2.22漢化
解壓縮:
tar –zxvf bugzilla-2.22.tar.gz
cd bugzilla-2.22
./checksetup.pl
得到類似的消息,須要安裝perl modules
-----------------------------------------------------------------------------------
Checking perl modules ...
Checking for AppConfig (v1.52) ok: found v1.56
Checking for CGI (v2.93) ok: found v3.20
Checking for Data::Dumper (any) ok: found v2.12
Checking for Date::Format (v2.21) ok: found v2.22
Checking for DBI (v1.38) ok: found v1.51
Checking for File::Spec (v0.84) ok: found v3.19
Checking for File::Temp (any) ok: found v0.13
Checking for Template (v2.08) ok: found v2.15
Checking for Text::Wrap (v2001.0131) ok: found v2001.0929
Checking for Mail::Mailer (v1.67) ok: found v1.74
Checking for MIME::Base64 (v3.01) ok: found v3.07
Checking for MIME::Parser (v5.406) ok: found v5.420
Checking for Storable (any) ok: found v2.06
The following Perl modules are optional:
Checking for GD (v1.20) not found
Checking for Chart::Base (v1.0) not found
Checking for XML::Twig (any) ok: found v3.09
Checking for GD::Graph (any) not found
Checking for GD::Text::Align (any) not found
Checking for PatchReader (v0.9.4) ok: found v0.9.5
Checking for Image::Magick (any) ok: found v5.56
If you you want to see graphical bug charts (plotting historical data over
time), you should install libgd and the following Perl modules:
GD: /usr/bin/perl -MCPAN -e 'install "GD"'
Chart: /usr/bin/perl -MCPAN -e 'install "Chart::Base"'
If you you want to see graphical bug reports (bar, pie and line charts of
current data), you should install libgd and the following Perl modules:
GD: /usr/bin/perl -MCPAN -e 'install "GD"'
GD::Graph: /usr/bin/perl -MCPAN -e 'install "GD::Graph"'
GD::Text::Align: /usr/bin/perl -MCPAN -e 'install "GD::Text::Align"'
Checking user setup ...
Removing existing compiled templates ...
Precompiling templates ...
Bugzilla requires that perl's DBD::mysql be installed.
To install this module, you can do:
/usr/bin/perl -MCPAN -e 'install "DBD::mysql"'
下載相關的moduels在
- AppConfig 1.52
- CGI 2.93
- Data::Dumper
- Date::Format 2.21 =====test-report
- DBI 1.36
- DBD::mysql 2.1010
- File::Spec 0.82 ==pathtool
- File::Temp
- Template 2.08
- Text::Wrap 2001.0131
-----------------------------------------------------------------------------------------------------------------------------
並按照上邊的順序安裝,安裝方法:
tar –zxvf xxxx
cd xxxx
perl Makefile.PL
make
make test
make install
再次運行./checksetup.pl
直到所有的moduels都是 found ok爲止
模塊到這裏下載http://search.cpan.org/~mverb/GDTextUtil-0.86/Text/Align.pm
輸入須要的名字,查詢就可以
最後會出現要求安裝:
Chart::Base ,GD ,GD::Graph ,GD::Text::Align三個文件
按照上邊的順序安裝,安裝提示須要libgd 2.0.28
這個時候去http://www.boutell.com/gd/ 下載libgd
./configure ,make ,make install
然後再次嘗試,ok,完成
再次到bugzilla 的目錄../checksetup.pl
只剩下一個moduels須要安裝:
DBD-mysql
安裝的時候提示須要mysql_config
經過尋找發現是mysql少安裝了一個這個,補充安裝
MySQL-devel-standard-4.1.21-0.rhel4.i386.rpm
安裝後,繼續perl Makefile.PL
提示錯誤,原來這個perl Makefile.Pl時候須要參數,格式大概是這樣
perl Makefile.PL --testuser=bugs testpassword=aa testhost=localhost testport=3306
make的時候保正mysql服務器是啓動着的。
(注:因爲有的perl程序中perl的路徑是/usr/local/bin/perl,而紅帽系統默認是/usr/bin/perl,所以最好做一個連接,保證兼容性 # ln -s /usr/bin/perl /usr/local/bin/perl)
繼續make
出現錯誤
/var/www 鏈 bugzilla
# ln -s /usr/local/bugzilla-xxx /var/www/bugzilla
設 apache
httpd.conf
查:
AddHandler cgi-script .cgi 釋.
查:
AddDefaultCharset ISO-8859-1 GB2312
:
Alias /bugzilla/ "/var/www/bugzilla/"
Options ExecCGI
AllowOverride Limit
開apache務
’