Bugzilla安装过程
1.安装和配置apache2:
1.配置:vi /etc/apache2/httpd.conf
添加: AddHandler cgi-scrīpt .cgi
Options All
AllowOverride Limit
Order allow,deny
Allow from all
2.修改 “DirectoryIndex index.html”在"index.html"前加入“index.cgi”
3.找到,DocumentRoot "/var/www/html",将引号中的内容替换为bugzilla的安装路径,本例为 /root/bugzilla/bugzilla-2.18rc2 ,替换完结果为:DocumentRoot“/root/bugzilla/bugzilla-2.18rc2”
说明:指定Apache服务器存放网页的根目录
4.(可选)找到 ServerName
5. 在行#ServerName new.host.name:80 下面添加如下内容:
6. ServerName 192.168.94.40:80
7.启动和关闭apache2
/etc/init.d/apache2 stop
/etc/init.d/apache2 start
8.测试APACHE2是否服务启动成功
如果显示it works就表示服务已成功。
2.安装mysql
1、下载源码包:
2、解包:tar -zxvf mysql-5.0.32.tar.gz
3、安装:cd mysql-5.0*
./configure --prefix=/usr/local/mysql
make
make install
完成安装
4、初始化mysql:/usr/local/mysql/bin/mysql_install_db--user=root
/usr/local/mysql/bin/mysqld_safe --user=root & (启动mysql 服务端)
/usr/local/mysql/bin/mysql --user=root ( 启动mysql客户端)
use mysql; (选择系统数据库)
update user set Password=password('YourPassword') where
User='root';(设置数据库root密码)
insert into user
(User,Host,Password,Select_priv,Insert_priv,Update_priv,Del
ete_priv,Index_priv,Alter_priv,Create_priv,Drop_priv,Grant
_priv,Reload_priv,Shutdown_priv,Process_priv,File_priv)
values('mysql','',password('YourPassword'),'Y','Y','Y','Y'
,'Y','Y','Y','Y','Y','Y','Y','Y','Y'); (增加数据库用户)
3.安装Perl(系统自带不用安)
1、下载源码包:
2、解包:tar -jvxf perl-5.8.8.tar.bz2
3、安装:rm -f config.sh Policy.sh
sh Configure -de
make
make test
make install
4.bugzilla安装配置
1、下载源码包:
2、解包:tar zxvf bugzilla-2*
3、配置:mkdir /srv/www/bugzilla-2 (创建bugzilla目录)
cd bugzilla*
mv * /srv/www/bugzilla-2 (移动bugzilla文件到apache服务目录)
4.安装perl模块
在bugzilla的解压目录下运行checksetup.pl文件检查模块的安装情况,如下:
# perl checksetup.pl
Checking perl modules ...
Checking for AppConfig (v1.52) not found
Checking for CGI (v2.93) not found
Checking for Data::Dumper (any) ok: found v2.12
Checking for Date::Format (v2.21) not found
Checking for DBI (v1.38) not found
Checking for File::Spec (v0.84) found v0.83
Checking for File::Temp (any) ok: found v0.13
Checking for Template (v2.10) not found
Checking for Text::Wrap (v2001.0131) ok: found v2001.0929
Checking for Mail::Mailer (v1.67) not found
Checking for MIME::Base64 (v3.01) found v2.12
Checking for MIME::Parser (v5.406) not found
Checking for Storable (any) ok: found v2.06
The following Perl modules are optional:
Checking for GD (v1.20) not found
Checking for Template::Plugin::GD::Image (any) 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) not found
Checking for Image::Magick (any) not found
Checking for HTML::Parser (v3.40) found v3.26
Checking for HTML::Scrubber (any) not found
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 want to convert BMP image attachments to PNG to conserve
disk space, you will need to install the ImageMagick application
Available from http://www.imagemagick.org, and the Image::Magick
Perl module by running (as root):
/usr/bin/perl -MCPAN -e 'install "Image::Magick"'
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"'
Template::Plugin::GD: /usr/bin/perl -MCPAN -e 'install "Template::Plugin::GD"'
If you want to see pretty HTML views of patches, you should install the
PatchReader module:
PatchReader: /usr/bin/perl -MCPAN -e 'install "PatchReader"'
If you want additional HTML tags within product and group descriptions,
you should install:
HTML::Scrubber: /usr/bin/perl -MCPAN -e 'install "HTML::Scrubber"'
HTML::Parser: /usr/bin/perl -MCPAN -e 'install "HTML::Parser"'
Bugzilla requires some Perl modules which are either missing from
your system, or the version on your system is too old.
They can be installed by running (as root) the following:
/usr/bin/perl -MCPAN -e 'install "MIME::Parser"'
Minimum version required: 5.406
/usr/bin/perl -MCPAN -e 'install "File::Spec"'
Minimum version required: 0.84
/usr/bin/perl -MCPAN -e 'install "Template"'
Minimum version required: 2.10
/usr/bin/perl -MCPAN -e 'install "Date::Format"'
Minimum version required: 2.21
/usr/bin/perl -MCPAN -e 'install "CGI"'
Minimum version required: 2.93
/usr/bin/perl -MCPAN -e 'install "Mail::Mailer"'
Minimum version required: 1.67
/usr/bin/perl -MCPAN -e 'install "MIME::Base64"'
Minimum version required: 3.01
/usr/bin/perl -MCPAN -e 'install "AppConfig"'
Minimum version required: 1.52
/usr/bin/perl -MCPAN -e 'install "DBI"'
Minimum version required: 1.38
你会发现有一大堆perl modules not found!你还会发现这个安装检查文件,告诉我们如何去安装那些没有的perl modules。
如:GD:/usr/bin/perl -MCPAN -e 'install "GD"'
上面提示告诉我们可以从CPAN仓库安装它,使用CPAN命令:
perl -MCPAN -e 'install "模块名称"'
5.手动安装找不到的perl模块
perl程序的安装都要经过:
perl Makefile.PL
make
make test //可省
make install
6.最后再次运行 perl checksetup.pl,直到找到全部的perl模块
7.再次配置apache
使用编辑器打开httpd.conf文件,如下:
vi httpd.conf
使用"/"命令查找字符串ServerName,并按如下所示修改:
ServerName 192.168.0.98:80
最后一行为添加的内容,192.168.0.98为Linux主机的IP地址。
8.启动httpd服务
/etc/init.d/apache2 stop
/etc/init.d/apache2 restart
9.配置mysql(在mySQL中配置bugzilla的帐户bugs)
# mysql -uroot -p
mysql> GRANT SELECT, INSERT,
-> UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES,
-> CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.*
-> TO bugs@localhost IDENTIFIED BY '';
mysql> FLUSH PRIVILEGES;
mysql> quit;
10.在bugzilla目录中编辑localconfig文件,如下:
把该文件中的index_html修改为
$index_html = 1;
最后一行为修改的内容,1表示产生index.html文件
11.重新执行checksetup.pl文件:
./checksetup.pl
至此bugzilla会把所有需要的表,自动创建到mysql中。
12.设置bugzilla目录权限:
chown -R apache:apache bugzilla-2
13. 设置head运行CGI script,去掉注释,如下:
vi httpd.conf
添加:AddHandler cgi-script .cgi
14.检查httpd.conf文件语法:
httpd -t
若显示Syntax Ok则表明语法正确。
15.重新启动apache服务器:
/etc/init.d/apache2 stop
/etc/init.d/apache2 start
16.访问bugzilla网站:
服务器IP/bugzilla
数据的备份和恢复
1.首先查看本机中mysql的配置文档/etc/mysql/中的my.cnf.
看如下一段:
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
注意文中红色的部分就是本系统中mysql存放数据的地方打开该文件夹,你就会看到你
以前为bugzilla或其他应用程序建立的库,本人为bugzilla所建的库名为bugs.他就是我们所要的库,如果你重新安装系统或bugzilla请务必保留该文件夹。
2.数据恢复
1.在我们移动bugs之前一定要在本地归档,不要在移动该文件后归档。然后我们在我们
已经装好的目标机上为bugzilla建一个同名的bugs库,然后把该库删除或备份。然后把归档好的bugs移动到/var/lib/mysql文件夹,解压,重新启动apache2和mysql即可。
阅读(3752) | 评论(0) | 转发(0) |