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

A Rocky Migration: Moving from docker-compose to Podman and gVisor

I've been running a few containers for several years. They were all running under rootless Docker with a single user. Initially, I planned to  migrate the containers to VMs , but I couldn't get a stable workflow after about two months of effort. Later,  gVisor caught my attention , and I decided to migrate to Podman with gVisor instead. The new plan is to run each container with  --userns=auto  and use Quadlet for systemd integration. This approach provides better isolation and makes writing firewall rules easier. I'm now close to migrating all my containers. Here are a couple of rough edges I'd like to share. Network Layout I compared  various networking options  and spent a few hours trying the one-interface-per-group approach before giving up. I settled on a single macvlan network and decided to use static IP addresses for my containers. To prevent a randomly assigned IP address from conflicting with a predefined one, I allocated a large IP range for my ...

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

mkosi: First Impressions

I stumbled upon the Gentoo wiki page for systemd-nspawn , which in turn led me to nspawn.org , mkosi , and later systemd-sysupdate . mkosi quickly caught my eye because it's almost exactly what I wanted to build myself, as mentioned in a previous post . So, I decided to spend my "sysadmin fun quota" on it. Overview mkosi is similar to docker build or podman build , but it's designed for creating full OS images. It focuses on development and testing. For example, much like nix-shell , mkosi can quickly launch a sandboxed shell with a specific distribution and selected packages installed. The systemd project itself uses mkosi for testing across different distros. The re-introduction article  is a great read. Speed Note that this is by no means a rigid benchmark. My setup is an SSD with LUKS and an ext4 filesystem (without reflink support). Building Container Images mkosi is pretty fast. A simple mkosi command creates a fresh Debian image. I used the --incrementa...