Installing bugzilla at OpenSUSE

Bugzilla is a Web-based general-purpose bugtracker and testing tool originally developed and used by the Mozilla project, and licensed under the Mozilla Public License. Released as open source software by Netscape Communications in 1998, it has been adopted by a variety of organizations for use as a defect tracker for both free and open source software and proprietary products.  In this tutorial we will show how to install bugzilla at your linux box. My Linux version is OpenSUSE 11.0. In order to start we need to grab the latest GA version from the bugzilla official web site. Put your pointer at http://www.bugzilla.org/download/ and grab the latest tar.gz, store it somewhere on your local hard drive. We need several things preinstalled in our Linux box, but the first and most important is apache2 web server. Most of todays linux systems come with Apache installed. For OpenSUSE the default htdocs storage is under /srv/www.

Step 1. tar xzvf bugzilla-3.6.tar.gz
Step 2. cp -r bugzilla-3.6 /srv/www/htdocs/
Step 3. cd /srv/www/htdocs/
Step 4. mv bugzilla-3.6/ bugzilla
Step 5. chgrp www /srv/www/htdocs/bugzilla
Step 6. chmod g+x /srv/www/htdocs/bugzilla

In steps 1-6 we untar the bugzilla archive in our local drive. We copy the directory under our web server directory and we give rights to our ‘www’ group.

Some important things that we need to check before installing.

Step 7. Check to see if perl is installed in your system. The command perl -v will show the version of Perl, if any. If you don’t have Perl, follow a tutorial on how to get and install it in Linux.

Step 8. Setup your MySQL database in order to accomodate the bugs database. If you are not familiar with MySQL and it’s installation procedure and the first step to fine tune it please visit a previous post at this blog that explains this things in detail. Go to http://cateof.wordpress.com/2010/04/18/opensuse-and-mysql-the-first-steps/ for further details.

Step 9. Once you are OK with MySQL (bugzilla works with Postgres and Oracle as well) create a database user in order to access the bugs database. bugzilla creates a database called ‘bugs’ and it needs a user to access it. You can do it by using the root mysql user, however this is not too clever. Follow the tutorial I mentioned on Step 8 and create a user called ‘netuser’ that has access to everything in your databases, therefore the netuser will have permissions to change everything in the bugs DB.

Step 10: change your directory to /srv/www/htdocs/bugzilla and execute ./checksetup.pl –check-modules.  This is the step that you will spend some time. Every PERL module checks for prerequisites and requires additional software to be installed. After the first parsing of this script you will be notified for the missing dependencies.  In order to finish soon with this obstacle type the perl install-module.pl –all, in order the script to connect to the Internet and grab the additional modules from the PERL repo.

Step 11: Run ./checksetup.pl. Now the script will respond with a message that every module is OK, however you need to change some of your paramets in apache and bugzilla.

Step 12: Create a backup of localconfig file. Type cp localconfig localconfig.back

Step 13: Edit this file with the following editor and make some changes.  You must change 3 variables:

  • $webservergroup = ‘www’; //it was ‘apache’ by default
  • $db_user = ‘netuser’; //it was bugs by default
  • $db_pass = ‘a_password’; // it was blank by default

Step 14:  Take a backup (cp httpd.conf http.conf.back) at your httpd.conf apache2 configuration file and make some changes with your favorite editor. At the end diffing the two files you must have the following changes:

dhcppc2:~ # diff /etc/apache2/httpd.conf /etc/apache2/httpd.conf.back
152,153c152,153
<     #Options None  //comment out the Options None
<     AllowOverride All // and make AllowOverride to All from None

>     Options None
>     AllowOverride None
167c167
< DirectoryIndex index.html index.html.var index.php index.cgi // add index.php and index.cgi also

> DirectoryIndex index.html index.html.var

Step 15: At /etc/apache2 copy default-server.conf to default-server.conf.back. Make the following changes (I have pasted the output of the command diff default-server.conf default-server.conf.back.

dhcppc2:/etc/apache2 # diff default-server.conf default-server.conf.back
7c7
< AddHandler    cgi-script      .cgi  //this line must be placed after the DocumentRoot “/srv/www/htdocs” line

>
22c22
<       #Options None //comment out Options None

>       Options None
26c26
<       AllowOverride All // change All to None for AllowOverride

>       AllowOverride None

Step 16: Enable mod_perl and restart apache. This is done with the following command

  • a2enmod mod_perl //enable mod perl
  • rcapache2 stop // stop apache
  • rcapache2 start // start apache
  • chkconfig -a apache2 //make apache start everytime the system starts (optional)

Step 17: Increase the max_allowed_packet at your MySQL configuration. Edit /etc/my.cnf and change max_allowed_packet to max_allowed_packet = 4M. This will permit 4meg attachments at your bugs. Restart mysql with /etc/init.d/mysql restart.

Run ./checksetup.pl at the bugzilla directory. Everything should work fine. Open your web browser and point to http://localhost/bugzilla/. Ready to go…


3 Comments on “Installing bugzilla at OpenSUSE”

  1. Wayne says:

    Or you could use a hosted Bugzilla service like devZing provides.

  2. Here is an article I wrote to install bugzilla on Ubunto.

    http://neil.motorcyclemarket.com/how-to-install-bugzilla-4-0-step-by-step-tutorial-that-works

    Seems to work great for many and feel free to leave me comments.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.