Installation
Step-by-step Install Bugzilla has been successfully installed under many different operating systems including almost all Unix clones and Microsoft Windows. Many operating systems have utilities that make installation easier or quirks that make it harder. We have tried to collect that information in , so unless you are on Linux, be sure to check out that section before you start your installation. Windows is one of those operating systems that has many quirks and is not yet officially supported by the Bugzilla team. If you wish to install Bugzilla on Windows, be sure to see . While installing Bugzilla, it is a good idea to ensure that there is some kind of configurable firewall between you and the rest of the Internet as your machine may be insecure for periods during the install. Many installation steps require an active Internet connection to complete, but you must take care to ensure that at no point is your machine vulnerable to an attack. This guide assumes that you already have your operating system installed, network configured, and have administrative access to the machine onto which you are installing Bugzilla. It is possible to install and run Bugzilla itself without administrative access, but you have to either make sure all the required software is installed or get somebody with administrative access to install it for you. You are strongly recommended to make a backup of your system before installing Bugzilla (and at regular intervals thereafter :-). Here's a basic step-by-step list: Install Perl (&min-perl-ver; or above) Install MySQL (&min-mysql-ver; or above) Install a Webserver Put Bugzilla in the Webspace Install Perl Modules Setup the MySQL Database
Perl Any machine that doesn't have Perl on it is a sad machine indeed. If your OS doesn't come with it, Perl can be got in source form from . There are also binary versions available for many platforms, most of which are linked to from perl.com. Although Bugzilla runs with perl &min-perl-ver;, it's a good idea to be up to the very latest version if you can when running Bugzilla. As of this writing, that is Perl version &newest-perl-ver;.
MySQL If your OS doesn't come with it or provide official packages, visit the MySQL homepage at to grab and install the latest stable release of the server. Many of the binary versions of MySQL store their data files in /var. On some Unix systems, this is part of a smaller root partition, and may not have room for your bug database. You can set the data directory as an option to configure if you build MySQL from source yourself. If you install from something other than a packaging/installation system (such as .rpm, .dep, .exe, or .msi) you will need to configure your system so the MySQL server daemon will come back up whenever your machine reboots. If you wish to have attachments larger than 64K, you will have to configure MySQL to accept large packets. This is done by adding the text in to your my.conf file. There is also a parameter in Bugzilla for setting the maximum allowable attachment size. You should set this value to be slightly larger than that parameter.
Set Max Packet Size in MySQL [mysqld] # Allow packets up to 1M set-variable = max_allowed_packet=1M
If you are running Bugzilla and MySQL on the same machine, you may also wish to utilize the option as mentioned in for the added security.
Adding a user to MySQL This first thing you'll want to do is make sure you've given the root user a password as suggested in . Then, you need to add a user for Bugzilla to use. For clarity, these instructions will assume that your MySQL user for Bugzilla will be bugs_user, the database will be called bugs_db and the password for the bugs_user user is bugs_password. You should, of course, substitute the values you intend to use for your site. Most people use bugs for both the user and database name. Don't use it for the password, though... We use an SQL GRANT command to create a bugs_user user. This also restricts the bugs_user user to operations within a database called bugs_db, and only allows the account to connect from localhost. Modify it to reflect your setup if you will be connecting from another machine or as a different user. mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE, DROP,REFERENCES ON bugs_db.* TO bugs_user@localhost IDENTIFIED BY 'bugs_password'; mysql> FLUSH PRIVILEGES; If you are using MySQL 4, the bugs user also needs to be granted the LOCK TABLES and CREATE TEMPORARY TABLES permissions, so add them to the list in the GRANT command.
HTTP Server You have freedom of choice here, pretty much any web server that is capable of running CGI scripts will work. has more information about configuring web servers to work with Bugzilla. We strongly recommend Apache as the web server to use. The Bugzilla Guide installation instructions, in general, assume you are using Apache. If you have got Bugzilla working using another webserver, please share your experiences with us by filing a bug in &bzg-bugs;.
Bugzilla You should untar the Bugzilla files into a directory that you're willing to make writable by the default web server user (probably nobody). You may decide to put the files in the main web space for your web server or perhaps in /usr/local with a symbolic link in the web space that points to the Bugzilla directory. If you symlink the bugzilla directory into your Apache's html hierarchy, you may receive Forbidden errors unless you add the FollowSymLinks directive to the <Directory> entry for the HTML root directory in httpd.conf. The default Bugzilla distribution is not designed to be placed in a cgi-bin directory (this includes any directory which is configured using the directive of Apache). Once all the files are in a web accessible directory, make that directory writable by your webserver's user. This is a temporary step until you run the post-install checksetup.pl script, which locks down your installation.
<filename>checksetup.pl</filename> Next, run the magic checksetup.pl script. This is designed to check whether you have all of the right Perl modules in the correct versions, and that Bugzilla is generally set up correctly. Eventually, it will make sure Bugzilla files and directories have reasonable permissions, set up the data directory, and create all the MySQL tables. But the first time you run it, it's highly likely to tell you that you are missing a few Perl modules. Make a note of which ones they are, and then proceed to the next section to install them. bash# ./checksetup.pl The first time you run it with all the correct modules installed, it will create a file called localconfig. This file contains a variety of settings you may need to tweak including how Bugzilla should connect to the MySQL database. The connection settings include: server's host: just use localhost if the MySQL server is local database name: bugs_db if you're following these directions MySQL username: bugs_user if you're following these directions Password for the bugs_user MySQL account; (bugs_password above) Edit the file to change these. Once you are happy with the settings, su to the user your web server runs as, and re-run checksetup.pl. (Note: on some security-conscious systems, you may need to change the login shell for the webserver account before you can do this.) On this second run, it will create the database and an administrator account for which you will be prompted to provide information. The checksetup.pl script is designed so that you can run it at any time without causing harm. You should run it after any upgrade to Bugzilla.
Perl Modules Don't be intimidated by this long list of modules. See for a way of installing all the ones you need with a single command. Perl modules can be found using CPAN on Unix based systems or PPM on Win32. Good instuctions can be found for using each of these services on their respective websites. The basics can be found in for CPAN and for PPM. Installing perl modules with CPAN The easy way: bash# perl -MCPAN -e 'install "<modulename>"' Or the hard way: bash# tar xzvf <module>.tar.gz bash# cd <module> bash# perl Makefile.PL bash# make bash# make test bash# make install This assumes that you've already downloaded the <module>.tar.gz to the current working directory. The process of untarring the module as defined in will create the <module> directory. Many people complain that Perl modules will not install for them. Most times, the error messages complain that they are missing a file in @INC. Virtually every time, this error is due to permissions being set too restrictively for you to compile Perl modules or not having the necessary Perl development libraries installed on your system. Consult your local UNIX systems administrator for help solving these permissions issues; if you are the local UNIX sysadmin, please consult the newsgroup/mailing list for further assistance or hire someone to help you out. Perl Modules (minimum version): Bundle::Bugzilla (Will allow you to skip the rest) CGI (&min-cgi-ver;) Date::Format (&min-date-format-ver;) DBI (&min-dbi-ver;) DBD::mysql (&min-dbd-mysql-ver;) File::Spec (&min-file-spec-ver;) File::Temp (&min-file-temp-ver;) Template Toolkit (&min-template-ver;) Text::Wrap (&min-text-wrap-ver;) and, optionally: GD (&min-gd-ver;) for bug charting Chart::Base (&min-chart-base-ver;) for bug charting XML::Parser (&min-xml-parser-ver;) for the XML interface GD::Graph (&min-gd-graph-ver;) for bug charting GD::Text::Align (&min-gd-text-align-ver;) for bug charting MIME::Parser (&min-mime-parser-ver;) for the email interface PatchReader (&min-patchreader-ver;) for pretty HTML view of patches
Bundle::Bugzilla If you are running at least perl 5.6.1, you can save yourself a lot of time by using Bundle::Bugzilla. This bundle contains every module required to get Bugzilla running. It does not include GD and friends, but these are not required for a base install and can always be added later if the need arises. Assuming your perl was installed with CPAN (most unix installations are), using Bundle::Bugzilla is really easy. Simply follow along with the commands below. bash# perl -MCPAN -eshell cpan shell -- CPAN exploration and modules installation (v1.63) ReadLine support enabled cpan> At this point, unless you've used CPAN on this machine before, you'll have to go through a series of configuration steps.
CGI (&min-cgi-ver;) The CGI module parses form elements and cookies and does many other usefule things. It come as a part of recent perl distributions, but Bugzilla needs a fairly new version. CPAN Download Page: PPM Download Link: Documentation:
TimeDate modules (&min-date-format-ver;) Many of the more common date/time/calendar related Perl modules have been grouped into a bundle similar to the MySQL modules bundle. This bundle is stored on the CPAN under the name TimeDate. The component module we're most interested in is the Date::Format module, but installing all of them is probably a good idea anyway. CPAN Download Page: PPM Download Link: Documentation:
DBI (&min-dbi-ver;) The DBI module is a generic Perl module used the MySQL-related modules. As long as your Perl installation was done correctly the DBI module should be a breeze. It's a mixed Perl/C module, but Perl's MakeMaker system simplifies the C compilation greatly. CPAN Download Page: PPM Download Link: Documentation:
MySQL-related modules The Perl/MySQL interface requires a few mutually-dependent Perl modules. These modules are grouped together into the the Msql-Mysql-modules package. The MakeMaker process will ask you a few questions about the desired compilation target and your MySQL installation. For most of the questions the provided default will be adequate, but when asked if your desired target is the MySQL or mSQL packages, you should select the MySQL related ones. Later you will be asked if you wish to provide backwards compatibility with the older MySQL packages; you should answer YES to this question. The default is NO. A host of 'localhost' should be fine and a testing user of 'test' with a null password should find itself with sufficient access to run tests on the 'test' database which MySQL created upon installation. CPAN Download Page: PPM Download Link: Documentation:
File::Spec (&min-file-spec-ver;) File::Spec is a perl module that allows file operations, such as generating full path names, to work cross platform. CPAN Download Page: PPM Download Page: Documentation:
File::Temp (&min-file-temp-ver;) File::Temp is used to generate a temporary filename that is guaranteed to be unique. It comes as a standard part of perl CPAN Download Page: PPM Download Link: Documentation:
Template Toolkit (&min-template-ver;) When you install Template Toolkit, you'll get asked various questions about features to enable. The defaults are fine, except that it is recommended you use the high speed XS Stash of the Template Toolkit, in order to achieve best performance. CPAN Download Page: PPM Download Link: Documentation:
Text::Wrap (&min-text-wrap-ver;) Text::Wrap is designed to proved intelligent text wrapping. CPAN Download Page: Documentation:
GD (&min-gd-ver;) [optional] You need the GD library if you want any of the graphing to work. The Perl GD library requires some other libraries that may or may not be installed on your system, including libpng and libgd. The full requirements are listed in the Perl GD library README. If compiling GD fails, it's probably because you're missing a required library. The version of the GD perl module you need is very closely tied to the libgd version installed on your system. If you have a version 1.x of libgd the 2.x versions of the GD perl module won't work for you. CPAN Download Page: PPM Download Link: Documentation:
Chart::Base (&min-chart-base-ver;) [optional] The Chart module provides Bugzilla with on-the-fly charting abilities. It can be installed in the usual fashion after it has been fetched from CPAN. Note that earlier versions that 0.99c used GIFs, which are no longer supported by the latest versions of GD. CPAN Download Page: PPM Download Link:
XML::Parser (&min-xml-parser-ver;) [optional] XML::Parser is used by the importxml.pl script. You only need it if you are going to be importing bugs (such as for bug moving). XML::Parser requires that the expat library is already installed on your machine. CPAN Download Page: Documentation:
GD::Graph (&min-gd-graph-ver;) [optional] In addition to GD listed above, the reporting interface of Bugzilla needs to have the GD::Graph module installed. CPAN Download Page: PPM Download Link: Documentation:
GD::Text::Align (&min-gd-text-align-ver;) [optional] GD::Text::Align, as the name implies, is used to draw aligned strings of text. It is needed by the reporting interface. CPAN Download Page: PPM Download Page: Documentation:
MIME::Parser (&min-mime-parser-ver;) [optional] MIME::Parser is only needed if you want to use the e-mail interface located in the contrib directory. CPAN Download Page: PPM Download Link: Documentation:
PatchReader (&min-patchreader-ver;) [optional] PatchReader is only needed if you want to use Patch Viewer, a Bugzilla feature to format patches in a pretty HTML fashion. There are a number of optional parameters you can configure Patch Viewer with as well, including cvsroot, cvsroot_get, lxr_root, bonsai_url, lxr_url, and lxr_root. Patch Viewer also optionally will use cvs, diff and interdiff utilities if they exist on the system (interdiff can be found in the patchutils package at . These programs' locations can be configured in localconfig. CPAN Download Page: Documentation:
Configuring Bugzilla Once checksetup.pl has run successfully, Bugzilla should start up. Proceed to the correct URL and log in with the administrator account you defined in the last checksetup.pl run. You should run through the parameters on the Edit Parameters page (link in the footer) and set them all to appropriate values. They key parameters are documented in .
HTTP Server Configuration The Bugzilla Team recommends Apache when using Bugzilla, however, any web server that can be configured to run CGI scripts should be able to handle Bugzilla. No matter what web server you choose, but especially if you choose something other than Apache, you should be sure to read . The plan for this section is to eventually document the specifics of how to lock down permissions on individual web servers.
Apache <productname>httpd</productname> You will have to make sure that Apache is properly configured to run the Bugzilla CGI scripts. You also need to make sure that the .htaccess files created by ./checksetup.pl are allowed to override Apache's normal access permissions or else important password information may be exposed to the Internet. You need to configure Apache to run .cgi files outside the cgi-bin directory. Open your httpd.conf file and make sure the following line exists and is uncommented: AddHandler cgi-script .cgi To allow .htaccess files to override permissions and .cgi files to run in the Bugzilla directory, make sure the following two lines are in a Directory directive that applies to the Bugzilla directory on your system (either the Bugzilla directory or one of its parents). Options +ExecCGI AllowOverride Limit You should modify the <DirectoryIndex> parameter for the Apache virtual host running your Bugzilla installation to allow index.cgi as the index page for a directory, as well as the usual index.html, index.htm, and so forth. For more information on Apache and its directives, see the glossary entry on .
Microsoft <productname>Internet Information Services</productname> If you need, or for some reason even want, to use Microsoft's Internet Information Services or Personal Web Server you should be able to. You will need to configure them to know how to run CGI scripts, however. This is described in Microsoft Knowledge Base article Q245225 for Internet Information Services and Q231998 for Personal Web Server. Also, and this can't be stressed enough, make sure that files such as localconfig and your data directory are secured as described in .
AOL Server Ben FrantzDale reported success using AOL Server with Bugzilla. He reported his experience and what appears below is based on that. AOL Server will have to be configured to run CGI scripts, please consult the documentation that came with your server for more information on how to do this. Because AOL Server doesn't support .htaccess files, you'll have to create a TCL script. You should create an aolserver/modules/tcl/filter.tcl file (the filename shouldn't matter) with the following contents (change /bugzilla/ to the web-based path to your Bugzilla installation): ns_register_filter preauth GET /bugzilla/localconfig filter_deny ns_register_filter preauth GET /bugzilla/localconfig~ filter_deny ns_register_filter preauth GET /bugzilla/\#localconfig\# filter_deny ns_register_filter preauth GET /bugzilla/*.pl filter_deny ns_register_filter preauth GET /bugzilla/syncshadowdb filter_deny ns_register_filter preauth GET /bugzilla/runtests.sh filter_deny ns_register_filter preauth GET /bugzilla/data/* filter_deny ns_register_filter preauth GET /bugzilla/template/* filter_deny proc filter_deny { why } { ns_log Notice "filter_deny" return "filter_return" } This probably doesn't account for all possible editor backup files so you may wish to add some additional variations of localconfig. For more information, see bug 186383 or Bugtraq ID 6501. If you are using webdot from research.att.com (the default configuration for the paramater), you will need to allow access to data/webdot/*.dot for the reasearch.att.com machine. If you are using a local installation of GraphViz, you will need to allow everybody to access *.png, *.gif, *.jpg, and *.map in the data/webdot directory.
Optional Additional Configuration
Dependency Charts As well as the text-based dependency graphs, Bugzilla also supports dependency graphing, using a package called 'dot'. Exactly how this works is controlled by the 'webdotbase' parameter, which can have one of three values: A complete file path to the command 'dot' (part of GraphViz) will generate the graphs locally A URL prefix pointing to an installation of the webdot package will generate the graphs remotely A blank value will disable dependency graphing. So, to get this working, install GraphViz. If you do that, you need to enable server-side image maps in Apache. Alternatively, you could set up a webdot server, or use the AT&T public webdot server (the default for the webdotbase param). Note that AT&T's server won't work if Bugzilla is only accessible using HARTS.
Bug Graphs As long as you installed the GD and Graph::Base Perl modules you might as well turn on the nifty Bugzilla bug reporting graphs. Add a cron entry like this to run collectstats.pl daily at 5 after midnight: bash# crontab -e 5 0 * * * cd <your-bugzilla-directory> ; ./collectstats.pl After two days have passed you'll be able to view bug graphs from the Bug Reports page.
The Whining Cron By now you have a fully functional Bugzilla, but what good are bugs if they're not annoying? To help make those bugs more annoying you can set up Bugzilla's automatic whining system to complain at engineers which leave their bugs in the NEW or REOPENED state without triaging them. This can be done by adding the following command as a daily crontab entry (for help on that see that crontab man page): cd <your-bugzilla-directory> ; ./whineatnews.pl Depending on your system, crontab may have several manpages. The following command should lead you to the most useful page for this purpose: man 5 crontab
LDAP Authentication LDAP authentication is a module for Bugzilla's plugin authentication architecture. The existing authentication scheme for Bugzilla uses email addresses as the primary user ID, and a password to authenticate that user. All places within Bugzilla where you need to deal with user ID (e.g assigning a bug) use the email address. The LDAP authentication builds on top of this scheme, rather than replacing it. The initial log in is done with a username and password for the LDAP directory. This then fetches the email address from LDAP and authenticates seamlessly in the standard Bugzilla authentication scheme using this email address. If an account for this address already exists in your Bugzilla system, it will log in to that account. If no account for that email address exists, one is created at the time of login. (In this case, Bugzilla will attempt to use the "displayName" or "cn" attribute to determine the user's full name.) After authentication, all other user-related tasks are still handled by email address, not LDAP username. You still assign bugs by email address, query on users by email address, etc. Because the Bugzilla account is not created until the first time a user logs in, a user who has not yet logged is unknown to Bugzilla. This means they cannot be used as an assignee or QA contact (default or otherwise), added to any cc list, or any other such operation. One possible workaround is the bugzilla_ldapsync.rb script in the contrib directory. Another possible solution is fixing bug 201069. Parameters required to use LDAP Authentication: loginmethod This parameter should be set to LDAP only if you will be using an LDAP directory for authentication. If you set this param to LDAP but fail to set up the other parameters listed below you will not be able to log back in to Bugzilla one you log out. If this happens to you, you will need to manually edit data/params and set loginmethod to DB. LDAPserver This parameter should be set to the name (and optionally the port) of your LDAP server. If no port is specified, it assumes the default LDAP port of 389. Ex. ldap.company.com or ldap.company.com:3268 LDAPbinddn [Optional] Some LDAP servers will not allow an anonymous bind to search the directory. If this is the case with your configuration you should set the LDAPbinddn parameter to the user account Bugzilla should use instead of the anonymous bind. Ex. cn=default,cn=user:password LDAPBaseDN The LDAPBaseDN parameter should be set to the location in your LDAP tree that you would like to search for e-mail addresses. Your uids should be unique under the DN specified here. Ex. ou=People,o=Company LDAPuidattribute The LDAPuidattribute parameter should be set to the attribute which contains the unique UID of your users. The value retrieved from this attribute will be used when attempting to bind as the user to confirm their password. Ex. uid LDAPmailattribute The LDAPmailattribute parameter should be the name of the attribute which contains the e-mail address your users will enter into the Bugzilla login boxes. Ex. mail
Preventing untrusted Bugzilla content from executing malicious Javascript code It is possible for a Bugzilla attachment to contain malicious Javascript code, which would be executed in the domain of your Bugzilla, thereby making it possible for the attacker to e.g. steal your login cookies. Due to internationalization concerns, we are unable to incorporate by default the code changes necessary to fulfill the CERT advisory requirements mentioned in . If your installation is for an English speaking audience only, making the change below will prevent this problem. Simply locate the following line in Bugzilla/CGI.pm: $self->charset(''); and change it to: $self->charset('ISO-8859-1');
Bugzilla and <filename>mod_perl</filename> Bugzilla is unsupported under mod_perl. Effort is underway to make it work cleanly in a mod_perl environment, but it is slow going.
<filename>mod_throttle</filename> and Security It is possible for a user, by mistake or on purpose, to access the database many times in a row which can result in very slow access speeds for other users. If your Bugzilla installation is experiencing this problem , you may install the Apache module mod_throttle which can limit connections by ip-address. You may download this module at . Follow the instructions to install into your Apache install. This module only functions with the Apache web server! You may use the ThrottleClientIP command provided by this module to accomplish this goal. See the Module Instructions for more information.
OS Specific Installation Notes Many aspects of the Bugzilla installation can be affected by the the operating system you choose to install it on. Sometimes it can be made easier and others more difficult. This section will attempt to help you understand both the difficulties of running on specific operating systems and the utilities available to make it easier. If you have anything to add or notes for an operating system not covered, please file a bug in &bzg-bugs;.
Microsoft Windows Making Bugzilla work on windows is still a painful processes. The Bugzilla Team is working to make it easier, but that goal is not considered a top priority. If you wish to run Bugzilla, we still recommend doing so on a Unix based system such as GNU/Linux. As of this writing, all members of the Bugzilla team and all known large installations run on Unix based systems. If after hearing all that, you have enough pain tolerance to attempt installing Bugzilla on Win32, here are some pointers.
Win32 Perl Perl for Windows can be obtained from ActiveState. You should be able to find a compiled binary at .
Perl Modules on Win32 Bugzilla on Windows requires the same perl modules found in . The main difference is that windows uses PPM instead of CPAN. C:\perl> ppm <module name> The above syntax should work for all modules with the exception of Template Toolkit. The Template Toolkit website suggests using the instructions on OpenInteract's website. A complete list of modules that can be installed using ppm can be found at .
Code changes required to run on win32 As Bugzilla still doesn't run "out of the box" on Windows, code has to be modified. This section is an attempt to list the required changes.
Changes to <filename>checksetup.pl</filename> In checksetup.pl, the line reading: my $mysql_binaries = `which mysql`; to my $mysql_binaries = "D:\\mysql\\bin\\mysql"; And you'll also need to change: my $webservergid = getgrnam($my_webservergroup) to my $webservergid = '8'
Changes to <filename>BugMail.pm</filename> To make bug e-mail work on Win32 (until bug 84876 lands), the simplest way is to have the Net::SMTP Perl module installed and change this: open(SENDMAIL, "|/usr/lib/sendmail $sendmailparam -t -i") || die "Can't open sendmail"; print SENDMAIL trim($msg) . "\n"; close SENDMAIL; to use Net::SMTP; my $smtp_server = 'smtp.mycompany.com'; # change this # Use die on error, so that the mail will be in the 'unsent mails' and # can be sent from the sanity check page. my $smtp = Net::SMTP->new($smtp_server) || die 'Cannot connect to server \'$smtp_server\''; $smtp->mail('bugzilla-daemon@mycompany.com'); # change this $smtp->to($person); $smtp->data(); $smtp->datasend($msg); $smtp->dataend(); $smtp->quit; Don't forget to change the name of your SMTP server and the domain of the sending e-mail address (after the '@') in the above lines of code.
Serving the web pages As is the case on Unix based systems, any web server should be able to handle Bugzilla; however, the Bugzilla Team still recommends Apache whenever asked. No matter what web server you choose, be sure to pay attention to the security notes in . More information on configuring specific web servers can be found in . If using Apache on windows, you can set the ScriptInterpreterSource directive in your Apache config, if you don't do this, you'll have to modify the first line of every script to contain your path to perl instead of /usr/bin/perl.
<productname>Mac OS X</productname> There are a lot of common libraries and utilities out there that Apple did not include with Mac OS X, but which run perfectly well on it. The GD library, which Bugzilla needs to do bug graphs, is one of these. The easiest way to get a lot of these is with a program called Fink, which is similar in nature to the CPAN installer, but installs common GNU utilities. Fink is available from . Follow the instructions for setting up Fink. Once it's installed, you'll want to use it to install the gd2 package. It will prompt you for a number of dependencies, type 'y' and hit enter to install all of the dependencies and then watch it work. You will then be able to use CPAN to install the GD perl module. To prevent creating conflicts with the software that Apple installs by default, Fink creates its own directory tree at /sw where it installs most of the software that it installs. This means your libraries and headers be at /sw/lib and /sw/include instead of /usr/lib and /usr/local/include. When the Perl module config script asks where your libgd is, be sure to tell it /sw/lib. Also available via Fink is expat. Once running using fink to install the expat package you will be able to install XML::Parser using CPAN. There is one caveat. Unlike recent versions of the GD module, XML::Parser doesn't prompt for the location of the required libraries. When using CPAN, you will need to use the following command sequence: # perl -MCPAN -e'look XML::Parser' # perl Makefile.PL EXPATLIBPATH=/sw/lib EXPATINCPATH=/sw/include # make; make test; make install # exit The look command will download the module and spawn a new shell with the extracted files as the current working directory. The exit command will return you to your original shell. You should watch the output from these make commands, especially make test as errors may prevent XML::Parser from functioning correctly with Bugzilla.
Linux-Mandrake 8.0 Linux-Mandrake 8.0 includes every required and optional library for Bugzilla. The easiest way to install them is by using the urpmi utility. If you follow these commands, you should have everything you need for Bugzilla, and ./checksetup.pl should not complain about any missing libraries. You may already have some of these installed. bash# urpmi perl-mysql bash# urpmi perl-chart bash# urpmi perl-gd bash# urpmi perl-MailTools bash# urpmi apache-modules for Bugzilla e-mail integration
Bugzilla Security Poorly-configured MySQL and Bugzilla installations have given attackers full access to systems in the past. Please take these guidelines seriously, even for Bugzilla machines hidden away behind your firewall. 80% of all computer trespassers are insiders, not anonymous crackers. This is not meant to be a comprehensive list of every possible security issue pertaining to the software mentioned in this section. There is no subsitute for reading the information written by the authors of any software running on your system.
TCP/IP Ports TCP/IP defines 65,000 some ports for trafic. Of those, Bugzilla only needs 1, or 2 if you need to use features that require e-mail such as bug moving or the e-mail interface from contrib. You should audit your server and make sure that you aren't listening on any ports you don't need to be. You may also wish to use some kind of firewall software to be sure that trafic can only be recieved on ports you specify.
MySQL MySQL ships by default with many settings that should be changed. By defaults it allows anybody to connect from localhost without a password and have full administrative capabilities. It also defaults to not have a root password (this is not the same as the system root). Also, many installations default to running mysqld as the system root. Consult the documentation that came with your system for information on making mysqld run as an unprivleged user. You should also be sure to disable the anonymous user account and set a password for the root user. This is accomplished using the following commands: bash$ mysql mysql mysql> DELETE FROM user WHERE user = ''; mysql> UPDATE user SET password = password('new_password') WHERE user = 'root'; mysql> FLUSH PRIVILEGES; From this point forward you will need to use mysql -u root -p and enter new_password when prompted when using the mysql client. If you run MySQL on the same machine as your httpd server, you should consider disabling networking from within MySQL by adding the following to your /etc/my.conf: [myslqd] # Prevent network access to MySQL. skip-networking You may also consider running MySQL, or even all of Bugzilla in a chroot jail; however, instructions for doing that are beyond the scope of this document.
Daemon Accounts Many daemons, such as Apache's httpd and MySQL's mysqld default to running as either root or nobody. Running as root introduces obvious security problems, but the problems introduced by running everything as nobody may not be so obvious. Basically, if you're running every daemon as nobody and one of them gets compromised, they all get compromised. For this reason it is recommended that you create a user account for each daemon. You will need to set the webservergroup to the group you created for your webserver to run as in localconfig. This will allow ./checksetup.pl to better adjust the file permissions on your Bugzilla install so as to not require making anything world-writable.
Web Server Access Controls There are many files that are placed in the Bugzilla directory area that should not be accessable from the web. Because of the way Bugzilla is currently laid out, the list of what should and should not be accessible is rather complicated. Users of Apache don't need to worry about this, however, because Bugzilla ships with .htaccess files which restrict access to all the sensitive files in this section. Users of other webservers, read on. In the main Bugzilla directory, you should: Block: *.pl *localconfig* runtests.sh But allow: localconfig.js localconfig.rdf In data: Block everything But allow: duplicates.rdf In data/webdot: If you use a remote webdot server: Block everything But allow *.dot only for the remote webdot server Otherwise, if you use a local GraphViz: Block everything But allow: *.png *.gif *.jpg *.map And if you don't use any dot: Block everything In Bugzilla: Block everything In template: Block everything You should test to make sure that the files mentioned above are not accessible from the Internet, especially your localconfig file which contains your database password. To test, simply point your web browser at the file; for example, to test mozilla.org's installation, we'd try to access . You should get a 403 Forbidden error. Not following the instructions in this section, including testing, may result in sensitive information being globally accessible. You should check to see if instructions have been included for your web server. You should also compare those instructions with this list to make sure everything is properly accounted for.
Troubleshooting This section gives solutions to common Bugzilla installation problems.
Bundle::Bugzilla makes me upgrade to Perl 5.6.1 Try executing perl -MCPAN -e 'install CPAN' and then continuing. Certain older versions of the CPAN toolset were somewhat naive about how to upgrade Perl modules. When a couple of modules got rolled into the core Perl distribution for 5.6.1, CPAN thought that the best way to get those modules up to date was to haul down the Perl distribution itself and build it. Needless to say, this has caused headaches for just about everybody. Upgrading to a newer version of CPAN with the commandline above should fix things.
DBD::Sponge::db prepare failed The following error message may appear due to a bug in DBD::mysql (over which the Bugzilla team have no control): To fix this, go to <path-to-perl>/lib/DBD/sponge.pm in your Perl installation and replace {'NUM_OF_FIELDS'}) { $numFields = $attribs->{'NUM_OF_FIELDS'}; } elsif ($attribs->{'NAME'}) { $numFields = @{$attribs->{NAME}}; ]]> by {'NUM_OF_FIELDS'}) { $numFields = $attribs->{'NUM_OF_FIELDS'}; } elsif ($attribs->{'NAMES'}) { $numFields = @{$attribs->{NAMES}}; ]]> (note the S added to NAME.)
cannot chdir(/var/spool/mqueue) If you are installing Bugzilla on SuSE Linux, or some other distributions with paranoid security options, it is possible that the checksetup.pl script may fail with the error: This is because your /var/spool/mqueue directory has a mode of drwx------. Type chmod 755 /var/spool/mqueue as root to fix this problem.
Your vendor has not defined Fcntl macro O_NOINHERIT This is caused by a bug in the version of File::Temp that is distributed with perl 5.6.0. Many minor variations of this error have been reported. Examples can be found in .
Other File::Temp error messages Your vendor has not defined Fcntl macro O_NOINHERIT, used at /usr/lib/perl5/site_perl/5.6.0/File/Temp.pm line 208. Your vendor has not defined Fcntl macro O_EXLOCK, used at /usr/lib/perl5/site_perl/5.6.0/File/Temp.pm line 210. Your vendor has not defined Fcntl macro O_TEMPORARY, used at /usr/lib/perl5/site_perl/5.6.0/File/Temp.pm line 233.
Numerous people have reported that upgrading to version 5.6.1 or higher solved the problem for them. A less involved fix is to apply the patch in . The patch is also available as a patch file.
Patch for File::Temp in Perl 5.6.0