弄了好久才安装成功,记下来备忘!
1.安装mysql
sudo apt-get install mysql-server
mysql -uroot
create database bugzilla;
2.安装apache2
sudo apt-get install apache2
3.安装bugzilla
sudo apt-get install bugzilla
4.配置bugzilla
sudo vi /etc/bugzilla/localconfig
修改db_user = "root";
db_pass = "";
cd /usr/share/bugzilla/lib/
sudo ./checksetup.pl
5.中文乱码解决
将 <Bugzilla安装目录>CGI.pm 的第55行改为 $self->charset(''UTF-8''),强迫Bugzilla采用UTF-8来处理字符串。这种方式能保证 以后无论在英文或中文Bugzilla界面输入的汉字都能正常显示;--但对于已经存在的、以Gb2312方式保存的汉字没有办法, 仍然显示为乱码!
Ubuntu下修改如下文件即可
sudo vi /usr/share/perl5/Bugzilla/CGI.pm
注 :如果安装后,在主页面输入用户名和密码登录时出现404错误,在地址栏的地址类似如下:
http://localhost/cgi-bin/bugzilla/cgi-bin/bugzilla/index.cgi
修改如下文件:
sudo vi /etc/bugzilla/params
修改下面一行:
''urlbase'' => "'''',
准备工作:
核实版本
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
登陆www.mysql.com/downloads/
选择一个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在
-----------------------------------------------------------------------------------------------------------------------------
并按照上边的顺序安装,安装方法:
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
出现错误invalid option tune=’pentium4’
uname –a 取得为athlon 改为athlon仍然错误
招到原因是因为gcc 不接收这个参数
打开Makefire文件,删除这个参数
make通过
继续make test
不能通过,查看错误,发现是test的时候设置了数据库用户名,但没设置密码
cd t
vi mysql.mtest
更改密码
make test 通过
make install 完成 modules安装
2,安装bugzilla
./checksetup.pl
Can't connect to the database
设置localconfig
设置apache
在 /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服务
汉化