Bugzilla is a defect or bug tracking system -- a system that allows individual or groups of developers to keep track of outstanding bugs in their products. This type of system lets users track bugs and code changes, communicate their actions with other teammates, submit and review repair patches, and manage quality assurance.
Bugzilla is prominent in the developer community because:
- It is a full-featured implementation.
- It is actively supported by the developer community and actively upgraded, often by the multitudes of users who work with it every day.
- It is open source.
- It is free.
Bugzilla is used by a number of organizations, including IBM at its Linux Technology Center. You can use the Bugzilla installation instructions in this article to add this bug-and-solution tracking tool to your Linux system.
The latest stable version of Bugzilla, 2.18rc3, requires the following software versions to be installed on your Linux system (see Resources for links):
- Perl version 5.6.0 or later, which should include the following Perl module versions:
AppConfig1.52CGI2.93Data::Dumper, any versionDate::Format2.21DBI1.36DBD::mysql2.1010File::Spec0.82File::Temp, any versionTemplate2.08Text::Wrap2001.0131
- MySQL version 3.23.41 or later
- An HTTP Web server, preferably Apache or IBM_HTTP server (I will be using Apache in this process)
- A mail transfer agent such as Sendmail 8.7 or later
If you're not sure that the proper Perl and MySQL software revision levels and Apache are installed, you can verify those packages this way:
- For Perl verification, type
$ perl -v - For MySQL verification, type
$ mysql -V
To verify the Web server version, you can visit the Web server's test page like this:
http://<your-machine-name>/
The test page for the Web server should give you all the basic information about the server and is a pretty good indicator that you have installed it correctly!
Because this article covers only the installation of Bugzilla, it assumes that you already have Perl, MySQL, Apache, and sendmail running or can install them. (See the Resources section if you need them.)
Start by visiting the Bugzilla Web site (see the Resources section for the link) and downloading the latest tarball for the application. Place the tarball into a directory that can be accessed by your Web server user. In this case, because you are using the Apache Web server, you are going to download the tarball into Apache's default directory. The most basic installation of Apache allows the "apache" user to access the /var/www/html/ directory.
Please check the documentation of your Apache installation to ensure that you are placing the tarball in an accessible directory. In any case, you can modify this to suit your needs.
Listing 1 shows you how to unpack all of the Bugzilla files into a directory called bugzilla-2.1.8rc3. Just for simplicity, you can optionally rename that directory to just "bugzilla" by executing the move command as shown.
Listing 1. Unpacking the Bugzilla tarball
$ cd /var/www/html/ $ tar zxvf bugzilla-2.18rc3.tgz $ mv bugzilla-2.18rc3/ bugzilla/ |
The Perl script in Listing 2 checks to see if you have the required Perl modules installed on your system. It also determines if you have the optional Perl modules that support features such as graphical charts and reports.
Listing 2. Perl module installation
$ su root
$ ./checksetup.pl |
Once this script has run, it should tell you what modules you need and the corresponding CPAN command needed to install them from the CPAN repository. That CPAN command looks like this: $ perl -MCPAN -e 'install "<module-name>"'. Issue this command for each Perl module that you need to install. If you are connected to the Internet, this downloads and installs the requested module automatically.
Once you have completed all the required module installs, rerun the checksetup.pl script. If all is well, you should see the output indicating that all of the required Perl modules are installed.
The script creates a file in your bugzilla directory called localconfig (as shown in Listing 3).
Listing 3. Bugzilla configuration
$ vi localconfig |
Configure the Bugzilla application to use your local database server. The command simply opens this file inside the vi editor. From here, you only need to change one value inside this file, the $db_pass field, the password used by the bugzilla's MySQL account (which you'll create in a moment). In case you have a more "customized" installation of MySQL, you may want to check all of the $db settings, since they correspond to hostname, communications port, and so on.
Create a database account for Bugzilla
Next, you need to create the MySQL database account for Bugzilla. Connect to your MySQL database instance and issue the following command:
Listing 4. Adding the Bugzilla MySQL account(version 4.0 or newer)
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY '$db_pass'; mysql> FLUSH PRIVILEGES; |
This set of commands creates the bugs user and grants that user account numerous levels of access to the "bugs" database when connecting locally. Refer to the MySQL Administration documentation (see Resources) for similar commands if you are connecting to a remote database or for any other custom configurations.
Check those Perl modules again
To reassure yourself that the required modules are present, rerun the checksetup.pl script from the Bugzilla directory (Listing 5). It now detects that localconfig has been modified, and it starts the user interface compilation process. After that occurs, the "bugs" database is created using the account specified in the localconfig file and populates the database with all the necessary tables.
Listing 5. Rerun checksetup.pl from the Bugzilla directory
$ ./checksetup.pl |
Finally, during this process you are asked how you would like to configure Bugzilla's administrator account.
Edit the HTTP server's configuration
With the most basic installation of Apache, the httpd.conf file is located in the /etc/httpd/conf/ directory. Be sure to check your installation to ensure that you are opening your Apache configuration file from the proper directory. Open it with the following command: $ vi /etc/httpd/conf/httpd.conf.
You need to edit a few lines inside this file to prepare Apache to utilize Bugzilla. First, you need to allow Apache to run CGI scripts outside of the cgi-bin directory. To do so, you must add (or uncomment) this line in httpd.conf: AddHandler cgi-script .cgi.
Next, you need to allow Bugzilla's .cgi files to run from the Bugzilla directory. Add these next two lines inside the <Directory /var/www/html > directive:
<Directory /var/www/html>
......
Options ExecCGI FollowSymLinks <---- add this line.
AllowOverride Limit <---- add this line.
</Directory>
|
For the last step, you need to configure Apache to expect the index.cgi file when entering the Bugzilla directory by adding the following to the end of the DirectoryIndex line in httpd.conf: DirectoryIndex index.html index.html.var index.cgi.
That's it! You should now be able to visit the Bugzilla page at http://<your-server-name>/bugzilla. Remember to log in with the administrator account/password created with the checksetup.pl Perl script earlier in the installation.
With your new installation of Bugzilla, you can set up and configure many additional features. I encourage you to explore the various features of Bugzilla and figure out how you want to use them (I plan to use my Bugzilla server as a means of tracking the many issues that arise within our department). As a code-versioning system or as a problem-ticketing system, Bugzilla is versatile enough to meet your business needs.
- Visit the Bugzilla Web site to download the latest version of Bugzilla.
- Be sure to visit perl.com for general information and CPAN for info on the many modules that can be used with Perl.
- To learn more about MySQL, visit the MySQL Web site for downloads and documentation.
-
"Installing CVS on RedHat 7" (developerWorks, May 2002) focuses on installing and configuring the Concurrent Versions System on RedHat Linux 7, including how to set up the user environment and how to test the installation.
-
"CVS for the developer or amateur" (developerWorks, March 2001) is a tutorial that introduces CVS, which helps developers build software in a flexible and collaborative manner by managing package updates.
-
"Cultured Perl: Managing Linux configuration files" (developerWorks, June 2004) explains how CVS can help with backing up, distributing, and making the peskiest Linux config file portable.
-
Visit the Kernel bug tracker for posting bugs against the mainline (not distribution) Linux kernels.
-
Take a look at just a few of the 394 companies, organizations, and projects that use Bugzilla, including NASA, Apache, Eclipse, GlaxoSmithKline, Novell, Sandia Labs, W3C, Wikipedia, and IBM.
- These versions of software are required to support Bugzilla 2.18rc3 on your Linux system:
- MySQL version 3.23.41
- An HTTP Web server, preferably Apache or IBM_HTTP
- A mail transfer agent such as Sendmail 8.7
- Perl version 5.6.0 is also required, as are these Perl modules:
- Find more resources for Linux developers in the developerWorks Linux zone.
- Get involved in the developerWorks community by participating in developerWorks blogs.
- Browse for books on these and other technical topics.
- Innovate your next Linux development project with IBM trial software, available for download directly from developerWorks.
Jason "Jay" Clark is the systems integrator and network administrator for the IBM developerWorks team in Research Triangle Park, NC. He currently holds multiple networking certifications and is well versed in both the Linux and Microsoft operating systems. Contact Jay at jclark4@us.ibm.com.





