Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to use Bugzilla on my own computer to track and trace bugs in our own software. How do I set this up?

share|improve this question
add comment

2 Answers 2

up vote 19 down vote accepted

For Bugzilla you need...

  • Per l(5.8.1 or above)
  • MySQL
  • Apache2
  • Bugzilla
  • Perl modules
  • Bugzilla using apache

Some remarks up front:

If any of these are already installed just keep an eye on settings that need to be set. Check these with what you used and change them to your needs.

If you need information about Perl, MySQL, Apache these are some LAMP how to's: 1, 2, 3, 4, 5.

Note: also have a look at this how to (from Saariko in comment) in below does not work for you.

In case anyone finds typo's feel free to fix them or improvements feel free to add them in

Here we go...

  1. Perl

    Verify what perl you are using:

    perl -v
    

    It should show something like this:

    This is perl, v5.10.1 (*) built for i686-linux-gnu-thread-multi
    (with 53 registered patches, see perl -V for more detail)
    

    Natty uses 5.10. If yours is lower than 5.8.1 you need to upgrade it.

  2. MySQL

    Verify if you have a MySQL running with

    mysql --version
    

    If not installed install mysql-server Install mysql-servermysql-admin Install mysql-adminmysql-client Install mysql-client

    Make sure to follow guidelines and set up a root account with a decent password. See the links above for how to set up a LAMP server if you need it. Create a user bugzilla (change it if you want something else)

    sudo useradd -d /home/bugzilla -m bugzilla
    sudo passwd bugzilla
    

    And create a database and set permissions for user bugzilla

    mysql -u root -p
    mysql> create database bugzilla;
    mysql> grant all privileges on bugzilla.* to bugzilla@localhost;
    

    You need database name, user name and password for the user later on.

  3. Apache

    Verify if Apache is installed:

    apache2 -v
    

    and

    http://localhost
    

    should show a welcome page or a website. If not installed...install apache2 Install apache2 Configure apache2 as you normally would. See the links at the top for how to set up a LAMP server if you need more.

    And now for the important part... setting up bugzilla in apache2:

    sudo gedit /etc/apache2/apache2.conf
    

    and edit in the following ...

    Alias /bugzilla/ /var/www/bugzilla/
    <directory /var/www/bugzilla>
    Addhandler cgi-script .cgi .pl
    Options +Indexes +ExecCGI +FollowSymLinks
    DirectoryIndex index.cgi
    AllowOverride Limit
    </directory>
    

    (Note the trailing "/" on the first line)

    Add a user apache2 if you do not have this already.

     sudo useradd -d /home/apache2 -m apache2
     sudo passwd apache2
    

    Add the user to apache2 variables...

    sudo gedit /etc/apache2/envvars
    

    and include

     export APACHE_RUN_USER=apache2
     export APACHE_RUN_GROUP=apache2
    

    The cgi addhandler could be in another place if you instal bugzilla from the repositories (see apache cgi how to)

  4. Bugzilla

    Install bugzilla3 Install bugzilla3

    Or download the latest stable (4.0.2 at the moment) or latest cutting edge version from bugzilla. Short instruction on the latter:

     sudo tar -xvf bugzilla-4.0.2.tar
     sudo mv /download/bugzilla-4.0.2 /usr/local/
     sudo ln -s /usr/local/bugzilla-4.0.2 /var/www/bugzilla
    

    Make sure the directory had rw permissions:

     sudo chown -R www-data:www-data /var/www/bugzilla
    
  5. Perl modules for Bugzilla

    Bugzilla uses a script checksetup.pl to check if everything is set up correcly and if things changed to set them up for you. By manually installing the perl modules you can skip this. Check if all modules are installed

     cd /var/www/bugzilla/
     sudo ./checksetup.pl --check-modules
    

    If not installed...

     sudo perl -MCPAN -e install
    

    localconfig holds the configurations and needs to be set up. So...

     sudo gedit localconfig
    

    and change $db_name to the database name, #db_user to the user and $db_password to the password you used during setup of MySQL.

     $db_name = 'bugzilla';
     $db_user = 'bugzilla';
     $db_pass = 'bugzilla@pwpspaswsword';
    

    After saving these settings

    cd /var/www/bugzilla/
    sudo ./checksetup.pl
    

    will add all kinds of tables to MySQL. Adding server group apache2 to bugzilla:

    sudo gedit /var/www/bugzilla/localconfig 
    

    and add

    $webservergroup = 'apache2';
    

    To include these changes do a

    cd /var/www/bugzilla/
    sudo ./checksetup.pl                       
    

    and this will ask you to setup your administrator for bugzilla.

  6. It works!!

    Restart apache2

    sudo /etc/init.d/apache2 restart
    

    and open a browser and insert URL

    http://localhost/bugzilla/ 
    

    and I have a working bugzilla login page on my own machine.

share|improve this answer
    
This didn't work for me until I changed your AllowOveride Limit to AllowOveride All, just a little note to all like me :) Other than that, you wrote a great guide.... –  Luke San Antonio Jul 20 '12 at 23:58
    
I have followed your advices on Quantal Ubuntu. sudo ./checksetup.pl reported no errors. But when I open the`http//<servername>/bugzilla3` I see listing of content of the /var/www/bugzilla dir, not the bugzilla itself. Can you help me? (BTW, access to any file in /var/www/bugzilla is denied if accessed by the Firefox; maybe this is a problem). –  Adam Ryczkowski Feb 1 '13 at 13:31
    
@Rinzwind thanks a lot. Very helpful. :) –  FireAndIce Feb 17 '13 at 5:59
add comment

I think a much shorter answer would be much more helpful:

sudo apt-get install bugzilla3

it asks a few questions. Then just open your browser and go to http://localhost/bugzilla3

All dependencies are installed automatically, everything is configured automatically. Automatic install should work in most cases, even if Apache or Mysql are already installed and configured (unless some non-trivial changes in their configuration have been made)

Novice Ubuntu users are misled by the detailed build-it-from-tarballs instructions.

share|improve this answer
1  
I want to point a great guide that I found on a step by step install. –  Saariko Sep 20 '11 at 10:35
    
You should've specified that you need Bugzilla 4. Installing bugzilla 3 is a one-step process, even in the guide you linked to. –  Sergey Sep 20 '11 at 11:04
    
I tried it with bugzilla 3 and it did not only not install all perl modules for me it did also not adjust apache2 for me. The above setup worked for me (but I started with a working apache2 (and in a VM ( ;) )) so perl and php set up to work). –  Rinzwind Sep 20 '11 at 12:12
1  
oh nice guide @Saariko :) –  Rinzwind Sep 20 '11 at 12:13
    
On a clean Ubuntu installation you can also just use Synaptic Package Manager. Tree clicks, and you're all set-up to go. –  Cees Meijer Feb 29 '12 at 13:16
add comment

protected by Braiam Feb 23 at 19:07

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.