Bugzilla

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
Current versions of Bugzilla require a couple of extra perl modules that Dreamhost does not have installed by default. Bugzilla's installer will tell you how to install them. When the installer prompts you to edit the "localconfig" file before continuing, make sure to set the 'suexec' variable to 1 for it to work with Dreamhost.

You really shouldn't run an older version of Bugzilla on Dreamhost as most of them contain unpatched security bugs which have been fixed in newer versions, but if you really need to install an older version for some reason, see Bugzilla/OldInstructions.

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
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 with  mkdir $HOME/myOwnDomain.com/bugs  </li> Untar the Bugzilla tarball into your html directory:  tar zxf ../bugzilla-STABLE.tar.gz  </li> Change to the bugzilla directory with the command:  cd bugzilla-###  where ### is the version number on the folder that you just extracted.</li> Create the default localconfig file by entering the command:  nice -n 19 ./checksetup.pl  You should see output similar to the following: <div style="padding: 1em; line-height: 1.1em; white-space: pre-wrap; border: 1px dashed rgb(47, 111, 171); background-color: rgb(249, 249, 249);"> * This is Bugzilla 4.2.4 on perl 5.10.0 Checking perl modules... Checking for               CGI.pm (v3.51)     ok: found v3.62 Checking for           Digest-SHA (any)       ok: found v5.45 Checking for             TimeDate (v2.21)     ok: found v2.22 Checking for            DateTime (v0.28)     ok: found v0.42 Checking for   DateTime-TimeZone (v0.71)     ok: found v0.7701 Checking for                 DBI (v1.41)     ok: found v1.605 Checking for    Template-Toolkit (v2.22)     found v2.19 Checking for          Email-Send (v2.00)     not found Checking for          Email-MIME (v1.904)    not found Checking for                 URI (v1.37)     found v1.35 Checking for      List-MoreUtils (v0.22)     ok: found v0.22 Checking for   Math-Random-ISAAC (v1.0.1)    not found Checking available perl DBD modules... Checking for              DBD-Pg (v1.45)     ok: found v2.8.7 Checking for           DBD-mysql (v4.001)    ok: found v4.007 Checking for          DBD-SQLite (v1.29)     found v1.14 Checking for          DBD-Oracle (v1.19)     not found The following Perl modules are optional: Checking for                  GD (v1.20)     ok: found v2.39 Checking for               Chart (v2.1)      ok: found v2.4.1 Checking for         Template-GD (any)       ok: found v1.56 Checking for          GDTextUtil (any)       ok: found v0.86 Checking for             GDGraph (any)       ok: found v1.44 Checking for          MIME-tools (v5.406)    ok: found v5.427 Checking for         libwww-perl (any)       ok: found v5.813 Checking for            XML-Twig (any)       ok: found v3.32 Checking for         PatchReader (v0.9.6)    found v0.9.5 Checking for           perl-ldap (any)       ok: found v0.36 Checking for         Authen-SASL (any)       ok: found v2.12 Checking for          RadiusPerl (any)       not found Checking for           SOAP-Lite (v0.712)    found v0.710.08 Checking for            JSON-RPC (any)       not found Checking for             JSON-XS (v2.0)      ok: found v2.01 Checking for          Test-Taint (any)       not found Checking for         HTML-Parser (v3.40)     ok: found v3.56 Checking for       HTML-Scrubber (any)       ok: found v0.08 Checking for              Encode (v2.21)     ok: found v2.23 Checking for       Encode-Detect (any)       not found Checking for Email-MIME-Attachment-Stripper (any)      not found Checking for         Email-Reply (any)       not found Checking for         TheSchwartz (any)       not found Checking for      Daemon-Generic (any)       not found Checking for            mod_perl (v1.999022) not found Checking for    Apache-SizeLimit (v0.96)     not found *********************************************************************** COMMANDS TO INSTALL OPTIONAL MODULES: PatchReader: /usr/bin/perl install-module.pl PatchReader RadiusPerl: /usr/bin/perl install-module.pl Authen::Radius SOAP-Lite: /usr/bin/perl install-module.pl SOAP::Lite JSON-RPC: /usr/bin/perl install-module.pl JSON::RPC Test-Taint: /usr/bin/perl install-module.pl Test::Taint Encode-Detect: /usr/bin/perl install-module.pl Encode::Detect Email-MIME-Attachment-Stripper: /usr/bin/perl install-module.pl Email::MIME::Attachment::Stripper Email-Reply: /usr/bin/perl install-module.pl Email::Reply TheSchwartz: /usr/bin/perl install-module.pl TheSchwartz Daemon-Generic: /usr/bin/perl install-module.pl Daemon::Generic mod_perl: /usr/bin/perl install-module.pl mod_perl2 Apache-SizeLimit: /usr/bin/perl install-module.pl Apache2::SizeLimit COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands and then re-run checksetup.pl): /usr/bin/perl install-module.pl Template /usr/bin/perl install-module.pl Email::Send /usr/bin/perl install-module.pl Email::MIME /usr/bin/perl install-module.pl URI /usr/bin/perl install-module.pl Math::Random::ISAAC To attempt an automatic install of every required and optional module with one command, do: /usr/bin/perl install-module.pl --all *** Installation aborted. Read the messages above. *** </tt> '''Note: mod_perl cannot be used on Dreamhost shared hosting accounts. It can be used on Dreamhost VPS accounts, but only if the web server is changed to 'unmanaged'. This configuration is not supported by Dreamhost.'''
 * Running on Linux 2.6.32.8-grsec-2.1.14-modsign-xeon-64 #2 SMP Sat Mar 13 00:42:43 PST 2010
 * REQUIRED MODULES                                                   *
 * Bugzilla requires you to install some Perl modules which are either *
 * missing from your system, or the version on your system is too old. *
 * See below for commands to install these modules.                   *
 * 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. Below that table are the *
 * commands to install each module.                                   *
 * MODULE NAME * ENABLES FEATURE(S)                *
 * PatchReader * Patch Viewer                      *
 * RadiusPerl * RADIUS Authentication             *
 * SOAP-Lite * XML-RPC Interface                 *
 * JSON-RPC * JSON-RPC Interface                *
 * Test-Taint * JSON-RPC Interface, XML-RPC Interface *
 * Encode-Detect * Automatic charset detection for text attachments *
 * Email-MIME-Attachment-Stripper * Inbound Email                     *
 * Email-Reply * Inbound Email                     *
 * TheSchwartz * Mail Queueing                     *
 * Daemon-Generic * Mail Queueing                     *
 * mod_perl * mod_perl                          *
 * Apache-SizeLimit * mod_perl                          *
 * Email-MIME-Attachment-Stripper * Inbound Email                     *
 * Email-Reply * Inbound Email                     *
 * TheSchwartz * Mail Queueing                     *
 * Daemon-Generic * Mail Queueing                     *
 * mod_perl * mod_perl                          *
 * Apache-SizeLimit * mod_perl                          *

If you see any output in red text then there's something you need to do manually before continuing. Read what it says needs to be done, and do it, then run checksetup.pl again the same way you ran it the first time.

When the instructions it gives you tell you to run install-module.pl, it is worth using "nice" to stop it from being too processor intensive, as DreamHost servers will kill processes it deems as using too much of the server resources, giving install errors. For example, to add MySQL support you would run nice -n 19 /usr/bin/perl install-module.pl DBD::mysql</tt> to install with a lower process priority.

Once all of the dependencies are taken care of, that red text should prompt you to edit the localconfig file: <pre style="color: red;"> This version of Bugzilla contains some variables that you may want to change and adapt to your local settings. The following variables are new to ./localconfig since you last ran checksetup.pl:

create_htaccess, webservergroup, use_suexec, db_driver, db_host, db_name, db_user, db_pass, db_port, db_sock, db_check, index_html, cvsbin, interdiffbin, diffpath, site_wide_secret

Please edit the file ./localconfig and then re-run checksetup.pl to complete your installation. At this point, continue to the following steps. </li> 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.</li> Edit localconfig with your favorite text editor. Make the following changes: <ol> Change $webservergroup = "apache"</tt> to $webservergroup = "yourgroup"</tt> 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!</li> Change $use_suexec = 0;</tt> to $use_suexec = 1;</tt></li> Change $db_host = "localhost"</tt> to $db_host = "mysql.myOwnDomain.com"</tt> (the value specified in "DB Hostname" above).</li> <li>Change <tt>$db_name = "bugs"</tt> to <tt>$db_name = "userbugs"</tt> (the value specified in "DB name" above).</li> <li>Change <tt>$db_user = "bugs"</tt> to <tt>$db_user = "userbugs"</tt> (the value specified in "DB Username" above).</li> <li>Change <tt>$db_pass = ;</tt> to <tt>$db_pass = password;</tt>, where password is the password you chose for "DB Password" above.</li> </ol> <li>re-run checksetup.pl: nice -n 12 ./checksetup.pl

This time it should prompt you to create your administrator account. Just fill in the blanks:

<div style="padding: 1em; line-height: 1.1em; white-space: pre-wrap; border: 1px dashed rgb(47, 111, 171); background-color: rgb(249, 249, 249);"><tt>Looks like we don't have an administrator set up yet. Either this is your first time using Bugzilla, or your administrator's privileges might have accidentally been deleted. Enter the e-mail address of the administrator: youremail@yourdomain.com Enter the real name of the administrator: Your Name Enter a password for the administrator account: password won't show while you type it Please retype the password to verify: password won't show while you type it youremail@yourdomain.com is now set up as an administrator. Creating initial dummy product 'TestProduct'... 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. checksetup.pl complete. </tt> </li> </ol> The green text means you're done. That should be it. Launch your web browser and point it to <tt> http://www. myOwnDomain.com/bugs/bugzilla-###</tt>. You should see the Bugzilla front page. Log in using the username and password you just created above, then go to Parameters and set the parameters appropriately.

Killed
The bugzilla install script may be killed prematurely by the procwatch daemon - see Killed