SolutionBase: Squashing bugs with Bugzilla

Keeping track of bugs is simple: users report them to the developer and the developer fixes the bug. But how are software bugs tracked? That's where Bugzilla comes in. Jack Wallen explains how you can make it work for your organization.

Many IT departments create code in-house for custom applications or Web sites, but in-house software design and deployment can become an issue, as they are always accompanied by work-flow stopping bugs.

For some, keeping track of bugs is simple: users report them to the developer and the developer fixes the bug. That works fine for small companies using smaller-scale software. But what about larger companies deploying large-scale software? How are software bugs tracked? That's where Bugzilla comes in. Here's how you can make it work for your organization.

What's Bugzilla?

Bugzilla was released as open source software in 1998. It was originally used by the Mozilla foundation to help track bugs as they developed what would become Firefox.

This bugtracking system is very popular. It's deployed by such places as:

  • NASA
  • ID Software
  • Mozilla
  • Linux kernel developers
  • GNOME developers
  • KDE developers
  • The Apache Project
  • OpenOffice
  • Eclipse
  • CNET Networks

So you know it's reliable. Why would you want to deploy Bugzilla? The Bugzilla Web site sums it up perfectly:

Many companies are finding that Bugzilla helps reduce downtime, increase productivity, raise customer satisfaction, and improve communication. Bugzilla can also help reduce costs by providing IT support accountability, telephone support knowledge bases, and by keeping tabs on unusual system or software issues. Bugzilla can do the same for your organization, regardless of its size.


I'm going to be upfront with you: Bugzilla's installation is time-consuming. There are a lot of packages to install, and most of them will have to be installed via the command line.

First, download the Bugzilla package; once you have that, move the package to the document root of your Web server. In my installation, document root is /var/www/html.

Next, unpack the archive with the command tar xvzf bugzilla-XXX.tgz (where XXX is the release number). Change to the newly created Bugzilla directory and run the command ./ as root. This command will check to see what you are missing in order to install Bugzilla. You will most likely see something the Bugzilla installer telling you to install the following mandatory modules with the following commands:

/usr/bin/perl -MCPAN -e 'install Email::Send'
/usr/bin/perl -MCPAN -e 'install Template'
/usr/bin/perl -MCPAN -e 'install Email::MIME::Modifier'
/usr/bin/perl -MCPAN -e 'install Date::Format'

The installation will also inform you about optional packages that can be installed with the following commands:




/usr/bin/perl -MCPAN -e 'install GD::Graph'



/usr/bin/perl -MCPAN -e 'install GD::Text'



/usr/bin/perl -MCPAN -e 'install Template::Plugin::GD::Image'



 /usr/bin/perl -MCPAN -e 'install GD'



/usr/bin/perl -MCPAN -e 'install Email::MIME::Attachment::Stripper'



/usr/bin/perl -MCPAN -e 'install Email::Reply'



/usr/bin/perl -MCPAN -e 'install Net::LDAP'



/usr/bin/perl -MCPAN -e 'install HTML::Scrubber'



/usr/bin/perl -MCPAN -e 'install MIME::Parser'



/usr/bin/perl -MCPAN -e 'install XML::Twig'



/usr/bin/perl -MCPAN -e 'install Chart::Base'



/usr/bin/perl -MCPAN -e 'install Image::Magick'




/usr/bin/perl -MCPAN -e 'install PatchReader'




/usr/bin/perl -MCPAN -e 'install SOAP::Lite'



/usr/bin/perl -MCPAN -e 'install Apache::DBI'


Here's the kicker (and the one thing the installation docs don't tell you): Depending upon your base OS installation, some of these packages are going to fail at installation without telling you why. The reason is that some of them depend upon the development package of the base package being installed.

For example, installing any of the DB modules will fail if you don't have db-devel installed. So as you run through the installation of the modules, if they fail, the solution is to install the base package development package.

Before you get into running the above commands, let's make sure you have what you need for the base install. You'll need:

  • Webserver: In my case, Apache
  • Database: In my case, MySQL
  • Perl 5.x: In my case, perl-5.8.8-18.fc7
  • Mail Transfer Agent: In my case, Sendmail

You'll also want to ensure you have the following for the optional packages:

  • gd
  • gd-devel
  • perl-LDAP
  • ImageMagick
  • ImageMagick-devel

With all the base requirements out of the way, you're ready to install. First, run the command:

perl -MCPAN -e 'install "Bundle::Bugzilla"'

Although this is not listed in the documentation, this action will get a lot of the prerequisites out of the way. You'll have to answer a few questions regarding your setup as this installs.

Once the Bundle::Bugzilla is installed, go to the list of mandatory module installation commands above and run them (as root). After the mandatory modules are installed, you can then install optional packages.

With the modules installed, run the ./ command again. Hopefully, you'll see that all the modules are up and running; now, open up the localconfig file and edit it according to your needs. Key options to configure are:

  • db_host: The host of your database.
  • db_name: The name of your database.
  • db_user: The user that connects to your database.
  • db_pass: The database password.
  • index_html: If enabled, this will create an index.html page for you. Bugzilla's main page is index.cgi; if your system doesn't allow for index.cgi as a directory index, set this to "1" so the Bugzilla system will create the index.html page for you.

Once you have set the above options, ensure that you have created the database named in the configuration file; I use phpMyAdmin to do so. Now rerun the ./ again. This time, the command should start the installation for you, during which you will be asked for an admin username and password, as well as a few other options. Once this is done, the installation will finish itself by saying:

Now that you have installed Bugzilla, you should visit the 'Parameters' page (linked in the footer of the Administrator account) to ensure it is set up as you wish - this includes setting the 'urlbase' option to the correct URL.

Of course, it doesn't bother telling you the address; but that's OK, because we already know it. Since the Bugzilla directory was unpacked into the document root, you can just point your browser to http://localhost/bugzilla/ (where localhost is the address of the Bugzilla server and bugzilla is the complete name of the bugzilla directory.).

Not working yet? You still need to configure your Apache server for this installation. As root, open the /etc/httpd/conf/httpd.conf file and add the following in the module section (if it is not presently there):

LoadModule cgi_module modules/

Add the following directory section:

<Directory /var/www/html/bugzilla>
  Options +ExecCGI
  AllowOverride Limit
  DirectoryIndex index.cgi
  AddHandler cgi-script .cgi

where Bugzilla is the complete directory name.

Now restart Apache with the command /etc/rc.d/init.d/httpd restart and, once again, point your browser to the Bugzilla directory. You should now see the Bugzilla login page, as shown in Figure A.

Figure A

Log in with the username/password you configured during installation.

Once you've logged in, scroll down to the bottom of the page and select the Parameters link. You'll see the screen shown in Figure B.

Figure B

There are plenty of configurations to take care of, but the installation suggests you start here.

Once in the parameters section, near the top, you'll notice that it tells you:


You can do this here.

There are a number of configuration options to take care of in this section. As you configure and save options, you'll notice the list on the home page shrinks. Your goal is to complete every configuration the homepage is telling you to take care of. Once you have that completed, you will get to your Bugzilla homepage, which in shown in Figure C.

Figure C

You are officially ready to start tracking bugs.

Adding a product

First, you'll have to add the product you want bug tracking applied to. To do this, go to the home page, scroll down, and select the Products link. Once in the new product page, shown in Figure D, enter in the required information and press Add. Once you add a product, you'll have to add components to the product before bugs can be added.

Figure D

Note that votes refers to votes given to a bug to move it from stage to stage (i.e., unconfirmed to confirmed).

To add a component to the Product, select the Products link from the main page and then select the Product you have created. From the Product page, select Edit Components. On the Edit Components page, you'll see the Add link to add a new component to the product. Select it to reveal the component add page, as shown in Figure E.

Figure E

The Default Assignee must be an actual username from the Bugzilla system.

You'll want to add components for each piece of the software package you need to track bugs for.

Now that the product has been successfully and completely added, your users can start filing bug reports.


In order to file a bug report, there must be users. You'll have to instruct your users to go to the home page and select the Open a new Bugzilla account link. It's very simple; users simply enter their e-mail address and wait for an e-mail to arrive with further instructions.


Bugzilla comes with a great repository of tools: summary reports and charts, bug searching, extensions for Firefox, Custom Field creation, and Requests. This is one serious tool for bug tracking. And for your users, there's an outstanding user's guide included in the release. To find the user's guide, navigate to the home page and then select the Bugzilla User's Guide link.

Final thoughts

Any company deploying their own software or hardware must understand that tracking bugs is critical in the success of not only their software, but their IT department in charge of said software. And Bugzilla is one of the best pieces of bug-tracking software available. Adding this tool to your toolbox will not only make your life easier, it will make your company more profitable. What company doesn't want that?