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...

Chasing an IO Phantom

My home server has been weird since months ago, it just becomes unresponsive occassionally. It is annoying but it happens only rarely, so normally I'd just wait or reboot it. But weeks ago I decided to get to the bottom of it. What's Wrong My system set up is: Root: SSD, LUKS + LVM + Ext4 Data: HDD, LUKS + ZFS 16GB RAM + 1GB swap Rootless dockerd The system may become unresponsive, when the IO on HDD  is persistantly high for a while. Also: Often kswapd0 has high CPU High IO on root fs (SSD) From dockerd and some containers RAM usage is high, swap usage is low It is very strange that IO on HDD can affect SSD. Note that when this happens, even stopping the IO on HDD does not always help. Usually restarting dockerd does not help, but rebooting helps. Investigation: Swap An obvious potential root cause is the swap. High CPU on kswapd0 usually means the free memory is low and the kernel is busy exchanging data between disk and swap. However, I tried the following steps, none of the...

Fix Google Security Code

Google Security Code (http://g.co/sc) is one type of 2-step verification. This is particularly useful when security keys and passkeys are not available. I have been using it in my LXC containers, until today I found out that it stopped working. It just kept saying "The code is invalid". It is easy to rule out some factors: The code works on other browsers on my laptop. The code works on other devices that are directly connected to the router. So it appears that Google also checks IP addresses besides the security code. Recently I have IPv6 enabled, so most devices that are directly connected to the router have both IPv4 and IPv6 addresses. But  I only enabled IPv4 for my LXC containers. So I guess when a code is generated by device A and used by device B, Google should be able to check that device A and device B are closely located. But in my case, IPv6 address appears on device A but not on device B, which may look suspicious. To fix the problem, I just needed to disable IPv...