set up Bugzilla on centos

Install Perl

Bugzilla 4.0.2 requires Perl version 5.8.1 or higher. Check with the following.
perl -v
If perl is not installed, then:
yum install perl
Before accepting, check if version is 5.8.1 or higher.
Install MySQL

Bugzilla 4.0.2 requires MySQL version 4.1.2 or higher. Check with the following.
mysqladmin version
If mysqld is not installed, then:
yum install mysql-server
Before accepting, check if version is 4.1.2 or higher.
Configure the MySQL server with the following.
chkconfig mysqld on
service mysqld start
mysqladmin password root-password
Install Apache Web Server

yum install httpd mod_ssl
Make sure apache starts when system boots.
chkconfig httpd on
All web transactions will be through port 443 over https. Run the following program to open the https port:
system-config-securitylevel-tui
Start the web server (or reboot the host).
service httpd start
Install Bugzilla

Get the most recent stable release of Bugzilla. I did this with the following.
yum install wget
cd /var/www/html
wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.0.2.tar.gz
tar -zxvf bugzilla-4.0.2.tar.gz
rm bugzilla-4.0.2.tar.gz
Make the apache user owner of the bugzilla folder.
chown -R apache:apache bugzilla-4.0.2
Install prerequisites needed for perl package installation.
yum install make gcc-c++ libtool mysql-devel
Run script to check for required perl packages.
cd bugzilla-4.0.2
./checksetup.pl --check-modules
The above command provides commands to install missing packages. I then ran the following.
/usr/bin/perl install-module.pl DBD::mysql
/usr/bin/perl install-module.pl Digest::SHA
/usr/bin/perl install-module.pl Date::Format
/usr/bin/perl install-module.pl DateTime
/usr/bin/perl install-module.pl DateTime::TimeZone
/usr/bin/perl install-module.pl Template
/usr/bin/perl install-module.pl Email::Send
/usr/bin/perl install-module.pl Email::MIME
/usr/bin/perl install-module.pl URI
/usr/bin/perl install-module.pl List::MoreUtils
After this completed, I ran the checksetup again as follows.
./checksetup.pl --check-modules
Configure Mail Transfer Agent

I intend to turn off mail completely.
Configure Bugzilla

Have checksetup.pl generate localconfig file. Edit this file to set the database username and password. The default username is bugs and the default password is an empty string.
Configure Apache Web Server

Create file /etc/httpd/conf.d/bugzilla.conf with the following contents. After generating localconfig, start reading through its contents to find out what more needs to get done. Based on the contents of localconfig, I did the following.
<Directory "/var/www/html/bugzilla-4.0.2">
   AddHandler cgi-script .cgi
   Options +Indexes +ExecCGI
   DirectoryIndex index.cgi
   AllowOverride Limit FileInfo Indexes
</Directory>
Restart Apache.
service httpd restart
Configure MySQL

To increase security, delete the test database and the anonymous user.
mysql -u root -p
mysql> drop database test;
mysql> drop user @'localhost';
mysql> drop user @'<hostname>';
Modify /etc/my.cnf by adding the following to the [mysql]] section. (These settings are explained in the Bugzilla documentation.)
max_allowed_packet=4M
ft_min_word_len=2
Create a user named bugs as follows.
mysql -u root -p
mysql>create database bugs;
mysql>grant all privileges on bugs.* to 'bugs' identified by '<bugs password>';
mysql> flush privileges;
Run checksetup.pl to generate the database tables.
Allow larger attachments as directed by the Bugzilla documentation.
mysql -u bugs -p
mysql> use bugs
mysql> ALTER TABLE attachments AVG_ROW_LENGTH=1000000, MAX_ROWS=20000;


refer to: http://www.thegeekstuff.com/2010/05/install-bugzilla-on-linux/#more-4417 http://cse.csusb.edu/turner/wiki/CentOS_Server_Bugzilla_Setup

如果提示Can't locate ExtUtils/MM.pm,可执行
#yum install mod_perl

#yum install perl-CPAN

http://blog.163.com/liu_qishan/blog/static/812422620104136273585/


/etc/init.d/postfix stop
/etc/init.d/sendmail restart
chkconfig postfix off
chkconfig sendmail on

$ $BUGZILLA_HOME/jobqueue.pl check
$ $BUGZILLA_HOME/jobqueue.pl -f -d restart

收不到邮件参考:http://guoh.org/lifelog/2011/04/sending-emails-with-smtp-in-bugzilla/


汉化:
下载附件, 解压, 将其放在%bugzilla_set_up_home%/template/en目录下(如/var/www/html/buzilla/template/en/)。
注意:下载后的文件夹名称为custom.

猜你喜欢

转载自maxrocray.iteye.com/blog/1682598