Bugzilla
From DreamHost
| The instructions provided in this article or section are considered advanced. You are expected to be knowledgeable in the UNIX shell. |
Contents |
Introduction
Bugzilla is a web-based tool for "change management", i.e. reporting and tracking changes (or requests for changes) to a product. It is typically used by software developers to allow a user to report a bug, provide a discussion forum for the bug, and to track any fixes (or other resolution) for the bug. However, Bugzilla is flexible enough that it can be used to manage any kind of requests for any kind of product or service. For example, it can be used by employees to request a service, such as asking the I.T. department to fix a paper jam in the printer in room 3E.
More information can be found at the Bugzilla web site: http://www.bugzilla.org/about/
Installing Bugzilla
The current stable version of Bugzilla (3.0) seems to require a couple of extra perl modules that Dreamhost does not have installed by default. See #Installing_3.0 for some help.
Before you begin
Go to the Dreamhost Manage Domain sub-panel of Domains (https://panel.dreamhost.com/index.cgi?tree=domain.manage&) and create the HTTP domain bugs.myOwnDomain.com to host the web interface to Bugzilla.
Hint: creating a sub-domain is cheaper (free) and faster than creating a new domain (the latter can take days to become active).
Creating the MySQL Database
Bugzilla uses MySQL as the database back-end. Fortunately, Dreamhost's MySQL support makes it real easy to set it up for Bugzilla. All you need to do is create a single database with some standard values.
Go the Dreamhost MySQL Web Admin panel (https://panel.dreamhost.com/index.cgi?tree=goodies.mysql), and enter in the following information:
DB name: userbugs
DB Hostname: mysql.myOwnDomain.com
DB Username: userbugs
DB Password: password
Repeat PW: password
where user is your userid and password is some password you've chosen.
After filling in all five fields, press the button labeled "Add a new database now!". The database will be ready to use in about 15 minutes, so if you complete all of the other steps before the database is ready, you'll just need to wait a little longer.
Configuring Bugzilla
| The instructions provided in this article or section require shell access unless otherwise stated. You can use the PuTTY client on Windows, or SSH on UNIX and UNIX-like systems such as Linux or Mac OS X. |
- Log in to your account using SSH.
- Download the bugzilla tarball:
wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-STABLE.tar.gz
- Change to your html directory (i.e. the directory that will store files for bugs.myOwnDomain.com)
using the command
cd myOwnDomain.com/bugs
(Hint, if that directory does not exist you can make it withmkdir $HOME/myOwnDomain.com/bugs
- Untar the Bugzilla tarball into your html directory:
tar zxf ../bugzilla-STABLE.tar.gz
- Change to the bugzilla directory with the command:
cd bugzilla-###
where ### is the version number on the folder that you just extracted. - Create the default localconfig file by entering the command:
./checksetup.pl
You should see the following output:
* This is Bugzilla 3.0 on perl 5.8.4 * Running on Linux 2.4.29-grsec+w+fhs6b+gr0501+nfs+a32+++p4+sata+c4+gr2b-v6.189 #1 SMP Mon Feb 7 13:23:30 PST 2005 Checking perl modules... Checking for CGI (v2.93) ok: found v3.04 Checking for TimeDate (v2.21) ok: found v2.22 Checking for DBI (v1.41) ok: found v1.46 Checking for PathTools (v0.84) ok: found v0.87 Checking for Template-Toolkit (v2.12) ok: found v2.14 Checking for Email-Send (v2.00) ok: found v2.185 Checking for Email-MIME-Modifier (any) ok: found v1.442 Checking available perl DBD modules... Checking for DBD-Pg (v1.45) found v1.41 Checking for DBD-mysql (v2.9003) ok: found v2.9006 The following Perl modules are optional: Checking for GD (v1.20) ok: found v2.23 Checking for Template-GD (any) ok: found v1.56 Checking for Chart (v1.0) ok: found v2.2 Checking for GDGraph (any) ok: found v1.43 Checking for GDTextUtil (any) ok: found v0.86 Checking for XML-Twig (any) ok: found v3.17 Checking for MIME-tools (v5.406) ok: found v5.417 Checking for libwww-perl (any) ok: found v2.033 Checking for PatchReader (v0.9.4) ok: found v0.9.5 Checking for PerlMagick (any) ok: found v6.0.6 Checking for perl-ldap (any) ok: found v0.32 Checking for SOAP-Lite (any) ok: found v0.66.1 Checking for HTML-Parser (v3.40) ok: found v3.45 Checking for HTML-Scrubber (any) ok: found v0.08 Checking for Email-MIME-Attachment-Stripper (any) not found Checking for Email-Reply (any) not found Checking for mod_perl (v1.999022) not found Checking for CGI (v3.11) found v3.04 Checking for Apache-DBI (v0.96) not found * NOTE: You must run any commands listed below as root. ********************************************************************** * OPTIONAL MODULES * ********************************************************************** * Certain Perl modules are not required by Bugzilla, but by * * installing the latest version you gain access to additional * * features. * * * * The optional modules you do not have installed are listed below, * * with the name of the feature they enable. If you want to install * * one of these modules, just run the appropriate command in the * * "COMMANDS TO INSTALL" section. * ********************************************************************** *********************************************************************** * MODULE NAME * ENABLES FEATURE(S) * *********************************************************************** * Email-Reply * Inbound Email * * Email-MIME-Attachment-Stripper * Inbound Email * * mod_perl * mod_perl * * Apache-DBI * mod_perl * * CGI * mod_perl * *********************************************************************** COMMANDS TO INSTALL: Email-Reply: /usr/bin/perl -MCPAN -e 'install Email::Reply' Email-MIME-Attachment-Stripper: /usr/bin/perl -MCPAN -e 'install Email::MIME::Attachment::Stripper' mod_perl: /usr/bin/perl -MCPAN -e 'install mod_perl2' Apache-DBI: /usr/bin/perl -MCPAN -e 'install Apache::DBI' CGI: /usr/bin/perl -MCPAN -e 'install CGI' Reading ./localconfig... OPTIONAL NOTE: If you want to be able to use the 'difference between two patches' feature of Bugzilla (which requires the PatchReader Perl module as well), you should install patchutils from: http://cyberelk.net/tim/patchutils/ This version of Bugzilla contains some variables that you may want to change and adapt to your local settings. Please edit the file ./localconfig and rerun checksetup.pl. The following variables are new to ./localconfig since you last ran checksetup.pl: create_htaccess, webservergroup, db_driver, db_host, db_name, db_user, db_pass, db_port, db_sock, db_check, index_html, cvsbin, interdiffbin, diffpathIf any of the modules in the top section that doesn't say "optional" are listed as missing, please see the section below for the specific version of Bugzilla you are installing to fix the version-specific issues, then return here and do this step again. - Find out your primary group. On the command line, run:
groups
and make note of the group listed there. If there is more than one, you want the first one. Remember this, you'll need it in the next step. - Edit localconfig with your favorite text editor. Make the following changes:
- Change $webservergroup = "apache" to $webservergroup = "yourgroup" where yourgroup is your primary group (which you looked up in the previous step). NOTE: Previous instructions here suggested to set $webservergroup = "" -- you do not want to do this as it will let anyone else hosted on the same machine with you screw with your bugzilla settings!
- Change $db_host = "localhost" to $db_host = "mysql.myOwnDomain.com" (the value specified in "DB Hostname" above).
- Change $db_name = "bugs" to $db_name = "userbugs" (the value specified in "DB name" above).
- Change $db_user = "bugs" to $db_user = "userbugs" (the value specified in "DB Username" above).
- Change $db_pass = ''; to $db_pass = 'password';, where password is the password you chose for "DB Password" above.
- re-run checksetup.pl:
./checksetup.pl
- Dreamhost uses suexec to run your CGIs. This means the CGIs run as your user and not as the webserver. As of Bugzilla 3.0.x, checksetup.pl still doesn't know how to deal with this (it's likely this will be fixed in Bugzilla 3.2). After running checksetup.pl (and after every time you ever run checksetup.pl) you'll need to run the following commands to set some additional permissions to let Bugzilla work under suexec on Dreamhost:
for i in docs graphs images js skins; do find $i -type d -exec chmod o+rx {} \; ; done for i in jpg gif css js png html rdf xul; do find . -name \*.$i -exec chmod o+r {} \; ; done find . -name .htaccess -exec chmod o+r {} \; chmod o+x . data data/webdot
That should be it. Launch your web browser and point it to http://www.myOwnDomain.com/bugs/bugzilla-###. You should see the Bugzilla front page.
Installing 2.18
As of May 12, 2006, installing Bugzilla 2.18 does not require any additional or updated modules. Just use the latest .tar.gz and follow the instructions as above.
Installing 2.20
As of May 12, 2006, installing Bugzilla 2.20 does not require any additional or updated modules. Just use the latest .tar.gz and follow the instructions as above.
Installing 2.22
As of May 12, 2006, installing Bugzilla 2.22 does not require any additional or updated modules. Just use the latest .tar.gz and follow the instructions as above.
Installing 3.0
Bugzilla 3.0 requires a couple of CPAN modules that are not installed by default. After executing checksetup.pl you will probably see a message indicating that you need to install Email::Send and Email::MIME::Modifier. Follow the instructions on the CPAN page to install a local copy of cpan and then execute the following commands:
$ cpan cpan> install Email::Send cpan> install Email::MIME::Modifier cpan> bye
You will need to add the following lines (replacing username with your actual user name, and assuming you used perlmods as suggested on the CPAN page) to the top of Bugzilla/Mailer.pm and after the first (shebang) line of checksetup.pl
use lib qw( /home/username/perlmods/lib/perl/5.8 /home/username/perlmods/lib/perl/5.8.4
/home/username/perlmods/share/perl/5.8 /home/username/perlmods/share/perl/5.8.4 );
It's important that the above lines get put before the 'use Email::Send' and 'use Email::MIME::Modifier' lines that are already in the file.
Now re-execute checksetup.pl and you can continue the installation as above.
Making email work
To get Bugzilla to send email you will need to go to the Email configuration page in Bugzilla and set your mail_delivery_method to SMTP, your smtpserver to smarty.dreamhost.com, and your mailfrom to a valid email address you have created in the Dreamhost panel.
I'm told using the above method (smarty.dreamhost.com) has limits on how many emails you can send per hour, to prevent runaway processes (or infected machines) from sending lots of spam. If you have a small Bugzilla without a lot of people using it, you'll probably be fine. If your Bugzilla winds up getting a lot of traffic, you'll probably want to set up SMTP authentication on your assigned mail server, which as of Bugzilla 3.0, still requires some code modification to Bugzilla:
On the Email configuration page in Bugzilla, set your smtpserver to mail.yourdomain.com where yourdomain.com is your domain name.
Now, find these lines in Mailer.pm:
if ($method eq "SMTP") {
push @args, Host => Bugzilla->params->{"smtpserver"},
Hello => $hostname
And add the following immediately after them (substitute the password for the account you used above for password below):
username => $from,
password => "password"

