Skip to main content

[转] centos 安装 bugzilla

转载本站文章请注明,转载自:扶凯[http://www.php-oa.com]

本文链接: http://www.php-oa.com/2007/12/21/linux-bugzilla-centos/


转载的话,请注明来自己www.php-oa.com

bugzilla是用的最多,很不错的bug跟踪系统,但他的安装难到了不少人.这边我写了一个简单安装指南.

安装配置Bugzilla 3

1.安装http,mysql等

yum install gd gd-devel httpd mysqld gcc g++ make

rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
上面是加入第三方扩展源,有很多包别人编译好了,我们可以直接使用.

yum install perl-XML-Twig
yum install ImageMagick-perl
yum install mod_perl
yum install perl-HTML-Parser
yum install perl-Email-MIME-Attachment-Stripper
yum install perl-Chart
yum install perl-PatchReader

yum install perl-Net-LDAP

2.生成Bugzilla数据库用户并分配权限
mysql -uroot -p

mysql>create database bugs DEFAULT CHARACTER SET utf8

mysql>GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY 'passwd';

3.下载安装Bugzilla,下载安装Perl模块

首先检查相应的perl模块是否已经安装完毕:
./checksetup.pl --check-modules

会出现如下的内容

安装必需的perl包:
/usr/bin/perl -MCPAN -e 'install Email::Send'
/usr/bin/perl -MCPAN -e 'install Template'
/usr/bin/perl -MCPAN -e 'install Email::MIME::Modifier'

安装可选的perl包:
/usr/bin/perl -MCPAN -e 'install GD::Graph'
/usr/bin/perl -MCPAN -e 'install Template::Plugin::GD::Image'
/usr/bin/perl -MCPAN -e 'install Email::Reply'
/usr/bin/perl -MCPAN -e 'install Email::MIME::Attachment::Stripper'
/usr/bin/perl -MCPAN -e 'install HTML::Scrubber'
/usr/bin/perl -MCPAN -e 'install XML::Twig'
/usr/bin/perl -MCPAN -e 'install Chart::Base'
/usr/bin/perl -MCPAN -e 'install Apache::DBI'

少了那个,就用命令安装就好了:命令就是 perl -MCPAN -e '包名'

都OK了的话.

修改localconfig文件,设置数据库访问方式
更改localconfig的以下设置:
$db_pass = '';

$db_pass = 'passwd';

再次运行CheckSetup.pl完成数据库初始化

4.在IIS管理器中为Bugzilla建立虚拟路径

最后,配置apache服务器,使Bugzilla 3以后可用。这一步只需添加以下文件即可:
/etc/httpd/conf.d/bugzilla.conf
文件/etc/httpd/conf.d/bugzilla.conf的内容如下:

#
# This configuration file is bugzilla.
#

Alias /bugzilla "/var/www/bugzilla"


AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit
Order allow,deny
Allow from all

添加安apache配置文件后,需要重启httpd,如果重启后不能生效,可能需要重启一下服务器主机:
service httpd restart

6. 配置,汉化Bugzilla

http://IP/bugzilla

如果能看到页面,则基本可以确定Bugzilla 3安装正常,可以正常使用了。如果需要定制Bugzilla 3,请以系统管理员登录Bugzilla 3,进行相应定制设置即可。
记的要用你设置的邮件地址做管理员的名字哦。我原来用安装时设置的名字一直不行,后来才发现.

Bugzilla的汉化其实很简单。
登录sourceforge,而bugzilla汉化项目bugzilla-cn在sourceforge上。
下载下来后,把 cn_UTF8.zip里的default目录放到template/en里,并更名为custom。

注:我不知为什么设置了管理员密码不生效,如果忘记了super user的密码。没有可反向解析的ip,意味着sendmail发的信到不了目的地。
这样注册的新用户就得不到注册时随机产生的密码。
要解决这个问题,可以把data/params里的mail_delivery_method改成testfile,这样就不会通过MTA来发信,而是把 信件内容保存在 data/mailer.testfile里。这样就的到了一个可用的普通用户。然后在mysql控制台里,把bugs数据库里的profiles表里的 这个用户的userid改成1,那么这个用户就变成了super user。

Comments

Popular posts from this blog

Determine Perspective Lines With Off-page Vanishing Point

In perspective drawing, a vanishing point represents a group of parallel lines, in other words, a direction. For any point on the paper, if we want a line towards the same direction (in the 3d space), we simply draw a line through it and the vanishing point. But sometimes the vanishing point is too far away, such that it is outside the paper/canvas. In this example, we have a point P and two perspective lines L1 and L2. The vanishing point VP is naturally the intersection of L1 and L2. The task is to draw a line through P and VP, without having VP on the paper. I am aware of a few traditional solutions: 1. Use extra pieces of paper such that we can extend L1 and L2 until we see VP. 2. Draw everything in a smaller scale, such that we can see both P and VP on the paper. Draw the line and scale everything back. 3. Draw a perspective grid using the Brewer Method. #1 and #2 might be quite practical. #3 may not guarantee a solution, unless we can measure distances/p...

Qubes OS: First Impressions

A few days ago, while browsing security topics online, Qubes OS surfaced—whether via YouTube recommendations or search results, I can't recall precisely. Intrigued by its unique approach to security through compartmentalization, I delved into the documentation and watched some demos. My interest was piqued enough that I felt compelled to install it and give it a try firsthand. My overall first impression of Qubes OS is highly positive. Had I discovered it earlier, I might have reconsidered starting my hardware password manager project. Conceptually, Qubes OS is not much different from running a bunch of virtual machines simultaneously. However, its brilliance lies in the seamless desktop integration and the well-designed template system, making it far more user-friendly than a manual VM setup. I was particularly impressed by the concept of disposable VMs for temporary tasks and the clear separation of critical functions like networking (sys-net) and USB handling (sys-usb) into the...

Exploring Immutable Distros and Declarative Management

My current server setup, based on Debian Stable and Docker, has served me reliably for years. It's stable, familiar, and gets the job done. However, an intriguing article I revisited recently about Fedora CoreOS, rpm-ostree, and OSTree native containers sparked my curiosity and sent me down a rabbit hole exploring alternative approaches to system management. Could there be a better way? Core Goals & Requirements Before diving into new technologies, I wanted to define what "better" means for my use case: The base operating system must update automatically and reliably. Hosted services (applications) should be updatable either automatically or manually, depending on the service. Configuration and data files need to be easy to modify, and crucially, automatically tracked and backed up. Current Setup: Debian Stable + Docker My current infrastructure consists of several servers, all running Debian Stable. System Updates are andled automatically via unattended-upgrades. Se...