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

Hardware Password Manager

[Updates 2025-01-20] The original blog post assumes that all passwords are stored in one password manager, and the password manager either unlocks everything or nothing (e.g. Keepass). After discussing with friends, I realized that if I use something like pass , and I use a hardware GPG token, I can actually store and sync all encrypted passwords to all devices, because I will only decrypt the passwords on demand, and the computer will not see the GPG private key. The compromise is that the computer will see the list of all password entries (e.g. accounts), as well as a few other issues . I've been using Keepass for many years. I don't use online password services because I cannot fully trust them. Besides, I may not always have Internet connection, which is why I also don't use a self-hosted service. Everything has been working fine, until I turn my paranoid knob to the max. Here's the thought experiment . The Imaginary Scenario Let's say I have 100 PCs for differe...

Installing Linux on Surface Pro 1g

Windows 10 will soon reach its end of life, and my 1-gen Surface Pro is not supported by Windows 11. I (finally) decided to install Linux to it. Fortunately, it's a not-so-easy nice adventure: The device has only one USB port, so I have to bring back my 10+-year old USB hub. My live USB drive cannot boot directly, I have to disable Secure Boot first, by holding Volume Up during boot. I think years ago I learned that booting on USB might not work through a USB hub, but fortunatelly it worked well with my setup. This is done by holding Volume Down during boot. Wifi adapter was detected in the live Linux environment, but not functional. And I don't have a USB-Ethernet adapter. Luckily, nowadays we have USB-tethering from Android phones, which works out-of-the-box. Originally I planned to following this guide to set up root on ZFS, however, the system froze when building the ZFS kernel module. Then I decided to just use EXT4, yet I still learned a lot from the guide about disk par...