Bugzilla on Debian

From Wikichris
Jump to: navigation, search

This page show how I installed Bugzilla on Squeeze (Debian 6).

I will use the default mode (CGI) instead of mod_perl because of the amount of resources necessary for the later.


Here is what we need:

  • a Web server
  • a Mail server
  • a database server

Web Server

Any default installation of apache will do

apt-get install apache2

Let's say that Apache is already installed and I will suppose that you know how to setup a new website as following:

At the begining of your Directory section you must add these 4 lines to allow bugzilla to work in CGI mode (the only other chose is PERL, which uses a lot of memory according to their own documentation).

       <Directory /home/websites/bugzilla/>
               AddHandler cgi-script .cgi
               Options +Indexes +ExecCGI
               DirectoryIndex index.cgi
               AllowOverride Limit FileInfo Indexes

Mail Server

Postfix locally installed (or Exim) will do, but anything external SMTP server would be ok as well. Bugzilla installer will ask you about that.

In my case, Debian is correctly configured in order to send emails itself, otherwise here is how I configured and tested mine :

Database Server

MySQL, PostgreSQL or Oracle works with Bugzilla, I have installed MySQL.

apt-get install mysql-server

After a default installation of Mysql you can execute the following command


It will help you secure your installation


First, download and unzip the last version available (4.0 in my case)

cd /home/websites
wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.0.tar.gz
tar xzf bugzilla-4.0.tar.gz
mv bugzilla-4.0 bugzilla

Temporarily give all access to your apache user (the Perl Script will adapt the access rights)

chown -R www-data.www-data bugzilla

Check if perl is installed and which modules are missing for bugzilla

perl -v
cd bugzilla
./checksetup.pl --check-modules

Install PERL for Apache and the missing modules (gcc and make are necessary to install TimeZone and Template)

apt-get install make gcc libapache2-mod-perl2
/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

A new check

cd /home/websites/bugzilla

Let's change the following values in ./localconfig

$webservergroup = 'www-data';
$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugzilla';
$db_user = 'bugzilla';
$db_pass = 'your_own_passwd';

And let's create the mysql database and its user

mysql -p
mysql> CREATE USER 'bugzilla'@'localhost' IDENTIFIED BY  'your_own_passwd';
mysql> CREATE DATABASE `bugzilla` ;
mysql> GRANT ALL PRIVILEGES ON  `bugzilla` . * TO  'bugzilla'@'localhost';
mysql> exit

NB1 (not tested): By default, MySQL will limit the size of a table to 4GB. This limit is present even if the underlying filesystem has no such limit. To set a higher limit, follow these instructions.

mysql -p
mysql> use bugzilla
mysql> ALTER TABLE attachments
          AVG_ROW_LENGTH=1000000, MAX_ROWS=20000;
mysql> exit

NB2 (not tested): By default, words must be at least four characters in length in order to be indexed by MySQL's full-text indexes. This causes a lot of Bugzilla specific words to be missed, including "cc", "ftp" and "uri".

It could be useful (I didn't do it yet) to add the following line in /etc/mysql/my.conf in the [mysqld] section

 # Allow small words in full-text indexes

A new check will create all necessary tables in MySQL

cd /home/websites/bugzilla

And ask the admin email

Enter the e-mail address of the administrator: my@email.com
Enter the real name of the administrator: Chris
Enter a password for the administrator account:

Bugzilla should now be available at