Unfortunately this isn't as easy as it should be, due to dependencies not getting installed properly out of the box.
First, download and unpack bugzilla:
wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-3.6.8.tar.gz
tar xvf bugzilla-3.6.8
mkdir /var/www/bugzilla
mv bugzilla-3.6.8/* /var/www/bugzilla/
Then check what dependencies are missing with checksetup.pl script:
cd /var/www/bugzilla
./checksetup.pl
This is likely to produce a lot of red lines with missing dependencies, and a way to install it which is supposed to be helpful (/usr/bin/perl install-module.pl --all). In a perfect world, this would solve all problems, but unfortunately it doesn't, as some of the modules simply fails to install. Luckily Ubuntu comes with some precompiled per modules that can be installed using apt:
sudo apt-get update
sudo apt-get install mysql-server build-essential -y
####################
# Required modules #
####################
# DBD::Mysql
sudo apt-get install libdbd-mysql-perl -y
# DateTime
sudo apt-get install libdatetime-perl -y
# Template
sudo apt-get install libtemplate-perl -y
/usr/bin/perl install-module.pl Template
####################
# Optional modules #
####################
# GD, Chart::Lines, Template::Plugin::GD::Image, GD::Text, GD::Graph
sudo apt-get install libtemplate-plugin-gd-perl -y
# Test::Taint
sudo apt-get install libtest-taint-perl -y
# Math::Random::Secure
sudo apt-get install libany-moose-perl libnamespace-clean-perl
/usr/bin/perl install-module.pl Math::Random::Secure
# mod-perl2
sudo apt-get install libapache2-mod-perl2 -y
Now we're ready to change localconfig, and set up database login for instance:
nano localconfig
Some changes:
# Ubuntu default webserver group
$webservergroup = 'www-data';
Then it's time to create database, and set up virtualhost for Apache:
./checksetup.pl
sudo nano /etc/apache2/sites-enabled/bugzilla
Paste the following config into it:
DocumentRoot /var/www/bugzilla
AddHandler cgi-script cgi pl
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit
After a quick restart of apache, you should be able to browse your newly installed bugzilla.
sudo /etc/init.d/apache2 restart
If you want to install the Bugzilla REST api, you can check out my post at: http://rdstash.blogspot.com/2010/10/bugzilla-rest-importexport-api.html