Howto install Bugzilla on Ubuntu 11.04

Update : 1st may 2011 : Updated the installation for Ubuntu 11.04 and Bugzilla 4.0

I was trying out bugzilla installation on Ubuntu. Although there is a bugzilla3 package I never was able to properly configure it. Today, decided to look at this issue again and googled for any HOWTOs. I got this sweet piece of setup at : Handyowner . There are some formatting issues which made me struggle a bit - so here is the reformated installation guide.

Ubuntu is already installed and configured on your target machine.
The machine is connected to the Internet you can browse the World Wide Web.
Here are the main steps:
  1. Install Per l(5.8.1 or above)
  2. Install MySQL
  3. Install Apache2
  4. Install Bugzilla 3.2
  5. Install Perl modules
  6. Bugzilla using apache
1. Perl
Verify if Perl is installed:

$ perl -v
If not installed :

$ sudo apt-get install perl
2. MySQL
Verify if MySQL is installed:

$ mysql --version
If not installed :

$ sudo apt-get install mysql-client mysql-server mysql-admin
Create “bugzilla” user with a strong password:
$ sudo useradd -d /home/bugzilla -m bugzilla
$ sudo passwd bugzilla
Tip! Here is what makes a password strong: make it lengthy, combine letters, numbers and symbols, use words and phrases that are easy for you to remember, but difficult for others to guess.
Create a database ‘bugzilla’ and grant privileges to ‘bugzilla’ database to ‘bugzilla’ user:

Tip! I usually set the bugzilla user password through the mysql admin interface ( Application -> Programming -> MySql Adminstrator).
$ mysql -u root -p
mysql> create database bugzilla;
mysql> show databases;
| Database |
| information_schema |
| bugzilla |

2 rows in set (0.00 sec)
mysql> grant all privileges on bugzilla.* to bugzilla@localhost;
3. Apache2
Verify if Apache is installed:

$ apache2 -v
You can also view in a web browser the default welcome page at http://localhost
If not installed :

$ sudo apt-get install apache2
4. Bugzilla 3.2.2
Download Bugzilla from the site “”.
Tip! Download a stable release, unless (1) you would like to go bleeding edge, (2) you do not care about spending time with your girlfriend, your wife, your kids or your buddies, (3) your boss said so and you couldn’t say no.
Untar the downloaded file to your download folder

$sudo tar -xvf bugzilla-3.2.2.tar
Move bugzilla dirrectory to /usr/local/

$ sudo mv /download/bugzilla-3.2.2 /usr/local/
Make a symbolic link from /usr/local/bugzilla3.x to /var/www/bugzilla

$ sudo ln -s /usr/local/bugzilla3.x /var/www/bugzilla
5. Perl Modules
Bugzilla’s installation process is based on a script called The first thing it checks is whether you have appropriate versions of all the required Perl modules. The aim of this section is to pass this check.

Verify if Perl modules are installed

$:/usr/local/bugzilla-3.2.2$ sudo ./ --check-modules
If not installed:

$:/usr/local/bugzilla-3.2.2$ sudo perl -MCPAN -e install
Edit the ‘localconfig’ file

$:/usr/local/bugzilla-3.2.2$ sudo gedit localconfig

Change the $db_name, $db_pass and $db_user value to the correct values. Here's how it looks like in my localconfig (replace the password with your actual password, this is just a placeholder here)

# The name of the database
$db_name = 'bugzilla';

# Who we connect to the database as.
$db_user = 'bugzilla';

# Enter your database password here.
$db_pass = 'bugzilla@123';

Run the again. This will add a whole lot of tables for bugzilla, and you can verify that by looking at the tables in the 'bugzilla' database.

$:/usr/local/bugzilla-3.2.2$ sudo ./
6. Configure Apache2 for Bugzilla
Add the following directives to /etc/apache2/apache2.conf
$sudo gedit /etc/apache2/apache2.conf

*Note : Since the brackets give problem with blogger, added pic for the relevant code changes. All the non commented lines are what you have to type in.

7. Additional security
create user “apache2″

$ sudo useradd -d /home/apache2 -m apache2
$ sudo passwd apache2
Edit /etc/apache2/envvars to add. This is how my config looks
export APACHE_RUN_USER=apache2
export APACHE_RUN_GROUP=apache2
Note : The default user and group is www-data. I don't really know how to setup the export to use both the www-data and the apache2 user simultaneously. If anyone can help with the syntax, it will be great ! 

Edit /usr/local/bugzilla-3.2.2/localconfig to add

$webservergroup = ‘apache2′;

$:/usr/local/bugzilla-3.2.2$ sudo ./
This will ask you to setup your administrator for bugzilla. Go ahead and enter the password and email ids.

8. Check the Installation
Restart the apache server using the command

$ sudo /etc/init.d/apache2 restart

Type the in your browser http://localhost/bugzilla/ . You should be getting the bugzilla login page. Login using the email and password you did at end of pt 7.


  1. For what it's worth, some of these instructions should just be replaced with a link to the standard Bugzilla 3.2 Configuration Manual:


  2. Your point 6 form me didn't work.
    I had to do it like this:

    Directory /var/www/bugzilla

    AddHandler cgi-script .cgi .pl
    Options +Indexes +ExecCGI +FollowSymLinks
    DirectoryIndex index.cgi
    AllowOverride Limit


  3. After follow all the steps,when I'm trying to access to the http://localhost/bugzilla I get the following error "Forbiden you dont have permission to access /bugzilla on this server". Any idea?

    1. I am also getting the same problem?how hv u solved this problem?please reply

    2. Try with:
      1. Change Deny from all to Allow from all in the default configuration for the apache directory
      2. chown -R www-data: /var/www/bugzilla

  4. Anon, apache needs read access to the bugzilla scripts. Try

    chown -R www-data:www-data /var/www/bugzilla

  5. @Pat , the angular brackets were being gobbled up by the blogger engine, and that was hiding everything between them - in this case the keyword 'directory' . I have removed the brackets.. and put a note there. Thanks for pointing it out !

    @Devon, I don't remember doing that step, but that might be what is causing problems for Anon.

  6. Added a screenshot of the offending piece of configuration.

    @Anon, you might have missed the Alias line ( check screenshot)

  7. Hi,
    Thank you very much!
    with ur document I was able to sort out runing bugzilla on ubuntu


  8. @Panduka great to hear that ! :)

  9. Get instructions ..... question though from a young developer....

    I get an internal error "cannot determine local time zone"

    Locks up the whole program. I am using Ubuntu 9.0.4


  10. What about email set-up? I've got a fresh install of Ubuntu 9.10 and I've followed these steps to get bugzilla up and running but the box is not configured to do anything with email.

    any help?

  11. Error on perl module install --all
    Configuring DBD::Pg 2.16.0
    Path to pg_config?

  12. Hi,

    i did follow the instructions; at the end when I try to start bugzilla in the browser I get the Forbidden error 403 as well so what can I do. I tried chown on www-data but nothing changed..
    Please help - write the answer here

  13. @anon, what is the ownership on the bugzilla folder for your system ? It should be in the apache2 group.

  14. @Colin, Sorry about the delayed response here. I hope your problem has been sorted out.

    Did you install perl using apt-get or are you manually building it ?

  15. Nice blog helped a lot
    Please mention the the Ownership settings for the Directory in the blog itself so that it saves time ;)

  16. Nice blog! I followed the instructions...but
    got following failure as I run

    TEST-FAILED Webserver is not executing CGI files
    Any idea why this failure?
    BTW,I have followed step 6 in this blog.

  17. It looks like your apache installation has a problem with the cgi handler. Please check the following page

    I hope that will help in getting the issue sorted out.

  18. Yes, that's the problem. I found the cgi-scripts
    are at different location than what I have put in
    Alias's working when I change directive url. Thanks.
    Somehow my installation has perl and cgi scripts are at diffrent location. Now cgi scripts working, perl
    scripts stop working.
    Thankyou. Your tip helped me to understand the problem.

  19. @Banani ... great to see it worked out finally for you.

    I am quite surprised that Bugzilla being such a popular software has such a pathetic installation , and that too not properly documented.

  20. I have install bugzilla using apt-get ...that's
    might be reason behind installing the scripts at different directores.

  21. Yeah. That could probably be the reason.

  22. Hey there.. great guide.. i'm a newbie to linux, databases, and everything acutally and this is my first time using bugzilla at all.. but with some som adjustment i got made it work.. (bugzilla 3.4.6 btw) ..

    thanks alot (:

  23. Another option is to use a hosted Bugzilla instance like provides.

  24. @Anon Glad the guide was of help.

    @Wayne That definitely is an option - if the corporate is ok with hosting their code in the cloud. Also, this guide is there as there will be people who want to setup the software for their own purpose in-house.

  25. I followed the guide which is great but when I run the Bugzilla URL it just displays the website file in text rather than runing up the proper website. Any ideas?

  26. Its nice steps to newbe

    thank you

  27. @Anonymous - if you are seeing the text it means that your apache configuration for perl is not correct. So, what is happening is that the perl page instead of being converted to html, is getting dumped as plain text.

  28. Thanks a lot, your article saved me today. keep it up!

  29. @Pascal Awesome ! I like success stories :)

  30. Hi Vibhu, I tried the steps mentioned in your blog and I got stuck up during the installation of the Perl. - ($:/usr/local/bugzilla-3.2.2$ sudo ./ --check-modules.) I'm installing it in a Ubuntu 8.10 machine and Bugzilla 3.2.2 version. I dont find the localconfig file too. please help me!. Thanks in advance.


  31. I am not sure about how to install on Ubuntu 8.10. Why not upgrade to the later versions ?

  32. I'm also having the same trouble as Anand, and I'm running 10.4. Any ideas for how to get around the Perl issue?

  33. i'm get this message when i open http://localhost/bugzilla

    Software error:

    The ./data/params file does not exist. You probably need to run at Bugzilla/ line 337.
    Compilation failed in require at /var/www/bugzilla/index.cgi line 34.
    BEGIN failed--compilation aborted at /var/www/bugzilla/index.cgi line 34.

    please help me...thx

  34. hi...

    I'm have trouble

    Software error:

    The ./data/params file does not exist. You probably need to run at Bugzilla/ line 337.
    Compilation failed in require at /var/www/bugzilla/index.cgi line 34.
    BEGIN failed--compilation aborted at /var/www/bugzilla/index.cgi line 34.

    need your help


  35. Just guessing here...

    1. is perl installed correctly ?
    2. does mysql use innodb ?

  36. This post helped me a lot installing bugzilla
    But I can't use the bugzilla webservice. If I try to run from bugzilla installation i get this error...

    Can't locate XMLRPC/Transport/ in @INC (@INC contains: lib /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /etc/perl/XMLRPC/ line 15.
    BEGIN failed--compilation aborted at /etc/perl/XMLRPC/ line 15.
    Compilation failed in require at ./ line 38.
    BEGIN failed--compilation aborted at ./ line 38.

  37. ###############################################################################
    # Main Body Execution

    # Return the appropriate HTTP response headers.
    print $cgi->header();

    if ($user->in_group('admin')) {
    # If 'urlbase' is not set, display the Welcome page.
    unless (Bugzilla->params->{'urlbase'}) {
    || ThrowTemplateError($template->error());
    # Inform the administrator about new releases, if any.
    $vars->{'release'} = Bugzilla::Update::get_notifications();

    # Generate and return the UI (HTML page) from the appropriate template.
    $template->process("index.html.tmpl", $vars)
    || ThrowTemplateError($template->error());

    can some body help !!
    this is the error giving
    i am trying to install bugzilla 3.6.2

  38. Thanks Vibhu. You step by step write up to install BugZilla helped a lot! Thanks again.

  39. thanks a looooooot. I did it . Please keep it up.-PRADEEP

  40. The best guide for Bugzilla on Ubuntu I used (and I used a lot)!!!

  41. Vibhu what version on Ubuntu where you running when you installed Bugzilla 3.2.2? Jackolope or Koala?

  42. Hi all,
    Just thought I'd put my 2 cents in.
    It didn't work for me with 10.04 due to MYSQL 5.1.31 and above no longer letting you write 'SET SESSION max_allowed_packet = xxxx'.

    So I installed Ubuntu 9 (Jaunty Jackalope)
    add these to /etc/apt/sources.list:
    deb dapper main universe
    deb dapper main universe
    deb dapper main universe

    Then installed mysql-server-5.0 as I had problems with 4.1.

    Then downloaded the relevant modules when checksetup complained using apt-cache search.

    Then when it complained about a password ROOT@LOCALHOST i then did:
    mysql -u root -p
    mysql-> SET PASSWORD FOR 'bugzilla'@'localhost' = PASSWORD('');

    Hope that helps :-)

    As I was tearing my hair out, encountering problem after problem

  43. All in all a very good tutorial!

  44. i followed all the instructions here but when i run ./ the ff. will be displayed displayed
    ./localconfig: Permission denied at Bugzilla/Install/ line 355, line 522.

  45. btw, my problem was solve. i just re configure bugzilla again BUT i can't access htt://localhost/ has this message
    Not Found

    The requested URL /bugzilla/ was not found on this server.
    Apache/2.2.12 (Ubuntu) Server at localhost Port 80

  46. @Ann is http://localhost/ going ok ?

    Also check the permissions on the bugzilla symbolic link that was created. That may be creating issues.


  47. Thanks for posting, Vibhu. The one issue I had was not being able to install DateTime and Template perl modules, but I found this solution elsewhere:
    $ sudo apt-get update
    $ sudo apt-get install build-essential

    Apparently I needed a c compiler =8-) Works just fine!

  48. Thanks a lot for this post, it is great, but after I followed the steps, when I try to view the page, I get this message:

    Software error:

    Can't locate Date/ in @INC (@INC contains: . lib /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl) at Bugzilla/ line 51.
    BEGIN failed--compilation aborted at Bugzilla/ line 51.
    Compilation failed in require at Bugzilla/ line 33.
    BEGIN failed--compilation aborted at Bugzilla/ line 33.
    Compilation failed in require at Bugzilla/Install/ line 31.
    BEGIN failed--compilation aborted at Bugzilla/Install/ line 31.
    Compilation failed in require at Bugzilla/ line 38.
    BEGIN failed--compilation aborted at Bugzilla/ line 38.
    Compilation failed in require at line 38.
    BEGIN failed--compilation aborted at line 38.
    Compilation failed in require at /var/www/bugzilla/index.cgi line 34.
    BEGIN failed--compilation aborted at /var/www/bugzilla/index.cgi line 34.

    For help, please send mail to the webmaster (webmaster@localhost), giving this error message and the time and date of the error.

  49. Thanks Vibhu Rishi for your inputs and followups.

    I was able to complete this with success, there are some external web checks required to complete some of the errors, but over all very good and useful document

  50. Vibhu, you have done great. I can easily setup using prefork mode with mod_perl.


  51. While grant permission for bugzilla user on mysql add the below line whie granting.

    IDENTIFIED BY 'your password for bugs@localhost';

  52. Vibhu,
    Great Post helped me out big time by the way I used your post to instal bugzilla 4.0.1. worked like charm.

    Only snag i ran it to was 403 forbidden error and it was due to my soft linkage in step 4.

    I literately used "bugzilla3.x" instead of using perticular path.

    $ sudo ln -s /usr/local/bugzilla3.x /var/www/bugzilla

    once i rectified my softlink by removing and re-adding no problemo.


  53. hey how do you make server access from http://localhost/bugzilla to http://someip/bugzilla adding virtual host didn't help

  54. for local intranet no need to setup virtual host just go ahead and type http://someip/bugzilla


  55. Hello, I am wondering if someone can help me. I literally just started learning Ubuntu 11.0.4 and I am trying to setup Bugzilla. I followed all the instructions and I am still unable to get the login page to come up. It appears that when I run the after making the edits for Apache, I get the following error:

    Initializing "Dependency Tree Changes" email_setting ...
    DBD::mysql::db selectrow_array failed: Incorrect file format 'bugs_fulltext' [for Statement "SELECT 1 FROM bugs_fulltext LIMIT 1"] at Bugzilla/Install/ line 3177
    Bugzilla::Install::DB::_populate_bugs_fulltext() called at Bugzilla/Install/ line 552
    Bugzilla::Install::DB::update_table_definitions('HASH(0x1c48d28)') called at ./ line 192

    It appears this doesn't complete, any ideas why?

  56. I fixed the issue above by restalling Ubuntu several times and following all the steps to install Bugzilla. I was finanlly successful but had issues when I rebooted. One important step is missing and the following link can help:

    In addition, here is a link to download the wireless driver for Ubuntu:

    Hope this helps others, as I had a difficult time!

  57. This is a great help, but I also had to install some dev tools on my server installation to get it to work

    sudo apt-get install libyaml-perl build-essential

  58. Hi vibhu,

    I got the following error, kindly advice

    DBD::mysql::db do failed: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value [for Statement "SET SESSION max_allowed_packet = 4194304"] at Bugzilla/DB/ line 113
    Bugzilla::DB::Mysql::new('Bugzilla::DB::Mysql', 'bugzilla', 'bugzilla', 'localhost', 'bugzilla', 3306, '') called at Bugzilla/ line 111
    Bugzilla::DB::_connect('mysql', 'localhost', 'bugzilla', 3306, '', 'bugzilla', 'bugzilla') called at Bugzilla/ line 96
    Bugzilla::DB::connect_main() called at line 317
    Bugzilla::dbh('Bugzilla') called at ./ line 142

    Thanks in advance

  59. Oh ! Thanks a lot ! Helped me in time !

  60. Really awesome guidelines...

  61. Nice guide. But the localconfig is generated only after running and not " --check-modules". please add the step.

  62. Used your guide today after being turned away from the crappy looking bugzilla documentation.

    Worked a treat! Thank you for the write up!

    (Ubuntu server 11.04, Bugzilla 4.2)

  63. @Kaustubh - the step is there in section 5 - last line.

    @Casey - you are welcome !

  64. I have installed bugzilla succesfully. But on my browser i'm still getting this error

    403 Forbidden


    You don't have permission to access /bugzilla/index.cgi on this server.

    share [tw]

    I have installed bugzilla succesfully. But on my browser i'm still getting this error

    403 Forbidden


    You don't have permission to access /bugzilla/admin.cgi on this server.

    I have given root:apache rights. File permission needed. Applied necessary changes in httpd.conf also. Don't know where i'm missing. Need your help friends.

  65. Hi Ankit,

    Make sure that the link created has the correct permissions and also that the apache2.conf is correct.

  66. I'm using linux & i have apache folder name. Can u tell me what prermission i need to set. For bugzilla folder & inner files/directories.

    I have also applied below permissions. Still no luck

  67. I have the following modules not found and this is after I did the $ apt-get install bugzilla3 command as well as the $ /usr/bin/perl –all command

    Any help?

    Checking for Math-Random-ISAAC (v1.0.1) not found

    Checking available perl DBD modules…
    Checking for DBD-Pg (v1.45) not found
    Checking for DBD-mysql (v4.001) ok: found v4.019
    Checking for DBD-SQLite (v1.29) not found
    Checking for DBD-Oracle (v1.19) not found

    The following Perl modules are optional:
    Checking for GD (v1.20) ok: found v2.46
    Checking for Chart (v2.1) ok: found v2.4.1
    Checking for Template-GD (any) ok: found v1.56
    Checking for GDTextUtil (any) ok: found v0.86
    Checking for GDGraph (any) ok: found v1.44
    Checking for MIME-tools (v5.406) ok: found v5.502
    Checking for libwww-perl (any) ok: found v6.02
    Checking for XML-Twig (any) not found
    Checking for PatchReader (v0.9.6) not found
    Checking for perl-ldap (any) not found
    Checking for Authen-SASL (any) not found
    Checking for RadiusPerl (any) not found
    Checking for SOAP-Lite (v0.712) not found
    Checking for JSON-RPC (any) not found
    Checking for JSON-XS (v2.0) not found
    Checking for Test-Taint (any) not found
    Checking for HTML-Parser (v3.40) ok: found v3.68
    Checking for HTML-Scrubber (any) not found
    Checking for Encode (v2.21) ok: found v2.39
    Checking for Encode-Detect (any) not found
    Checking for Email-MIME-Attachment-Stripper (any) not found
    Checking for Email-Reply (any) not found
    Checking for TheSchwartz (any) not found
    Checking for Daemon-Generic (any) not found
    Checking for mod_perl (v1.999022) not found
    Checking for Apache-SizeLimit (v0.96) not found

  68. Thanks for gathering this info into a single location. v useful

  69. Hi Vibhu,

    I am installing bugzilla on Ubuntu 12.

    ./ is successful.
    Mysql is running with no problem.
    apache2 is also running fine.
    apache2.cnf file is configured fine with necessary changes.

    but when I try to access the bugzilla page with http:\\ - An error display "Page not found".

    When I try to access http:\\localhost - An error reports "Not Found

    The requested URL /localhost was not found on this server.
    Apache/2.2.22 (Ubuntu) Server at Port 80"

    So kindly suggest me what could be the problem?


  70. Hi Vibhu,

    I am installing bugzilla 4.2.4 on ubuntu 12.04. localconfig file is not getting created in the bugzilla directory. So , when I run localhost/bugzilla I am getting .data/params file doesn't exist error. If I run ./, it says XML Twig is not installed. But it's already up to date. Kindly help me fix this.

  71. Doesn't work for my ...
    I got forbidden errors because of the link to /usr/local.
    mv /usr/local/bugzilla /var/www

  72. In case it helps anyone, I found that I had to comment out this line:-

    Options -Indexes

    In the .htaccess file in the root of the installation before it would load.

    Rod Tatham

  73. thank you very much it helps me a lot

  74. This is my Problem Can you help me?

    root@avocado:/usr/local/bugzilla-4.4.1# ./ http://localhost/bugzillaTEST-OK Webserver is running under group id in $webservergroup.
    TEST-FAILED Fetch of images/padlock.png failed
    Your web server could not fetch http://localhost/bugzilla/images/padlock.png.
    Check your web server configuration and try again.

    1. hmm. not too sure.

      Can you check if http://localhost is loading properly on a web browser ?
      Then check if permissions on the files is ok.