📄 bugzilla-guide.txt
字号:
In outline, the installation proceeds as follows: 1. Install Perl (5.6.0 or above for non-Windows platforms; 5.8.1 for Windows) 2. Install MySQL (3.23.41 or above) 3. Install a Webserver 4. Install Bugzilla 5. Install Perl modules 6. Install a Mail Transfer Agent (Sendmail 8.7 or above, or an MTA that is Sendmail-compatible with at least this version) 7. Configure all of the above. _________________________________________________________________2.1.1. Perl Installed Version Test: perl -v Any machine that doesn't have Perl on it is a sad machine indeed. If you don't have it and your OS doesn't provide official packages, visit http://www.perl.com. Although Bugzilla runs with Perl 5.6.0, it's a good idea to be using the latest stable version. As of this writing, that is Perl 5.8.3. _________________________________________________________________2.1.2. MySQL Installed Version Test: mysql -V If you don't have it and your OS doesn't provide official packages, visit http://www.mysql.com. You need MySQL version 3.23.41 or higher. Note 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. To change the data directory, you have to build MySQL from source yourself, and set it as an option to configure. If you install from something other than a packaging/installation system, such as .rpm (Redhat Package), .deb (Debian Package), .exe (Windows Executable), or .msi (Microsoft Installer), make sure the MySQL server is started when the machine boots. _________________________________________________________________2.1.3. Web Server Installed Version Test: view the default welcome page at http://<your-machine>/ You have freedom of choice here, pretty much any web server that is capable of running CGI scripts will work. However, we strongly recommend using the Apache web server (either 1.3.x or 2.x), and the installation instructions usually assume you are using it. If you have got Bugzilla working using another webserver, please share your experiences with us by filing a bug in Bugzilla Documentation. If you don't have Apache and your OS doesn't provide official packages, visit http://httpd.apache.org/. _________________________________________________________________2.1.4. Bugzilla Download a Bugzilla tarball (or check it out from CVS) and place it in a suitable directory, accessible by the default web server user (probably "apache" or "www"). Good locations are either directly in the main web space for your web server or perhaps in /usr/local with a symbolic link from the web space. Caution The default Bugzilla distribution is NOT designed to be placed in a cgi-bin directory. This includes any directory which is configured using the ScriptAlias 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 checksetup.pl script, which locks down your installation. _________________________________________________________________2.1.5. Perl Modules Bugzilla's installation process is based on a script called checksetup.pl. The first thing it checks is whether you have appropriate versions of all the required Perl modules. The aim of this section is to pass this check. When it passes, do not run it again, but proceed to Section 2.2. At this point, you need to su to root. You should remain as root until the end of the install. Then run: bash# ./checksetup.pl checksetup.pl will print out a list of the required and optional Perl modules, together with the versions (if any) installed on your machine. The list of required modules is reasonably long; however, you may already have several of them installed. There is a meta-module called Bundle::Bugzilla, which installs all the other modules with a single command. You should use this if you are running Perl 5.6.1 or above. The preferred way of installing Perl modules is via CPAN on Unix, or PPM on Windows (see Section 2.4.1.2). These instructions assume you are using CPAN; if for some reason you need to install the Perl modules manually, see Appendix D. bash# perl -MCPAN -e 'install "<modulename>"' If you using Bundle::Bugzilla, invoke the magic CPAN command on it. Otherwise, you need to work down the list of modules that checksetup.pl says are required, in the order given, invoking the command on each. Tip 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. Note If you are using a package-based system, and attempting to install the Perl modules from CPAN, you may need to install the "development" packages for MySQL and GD before attempting to install the related Perl modules. The names of these packages will vary depending on the specific distribution you are using, but are often called <packagename>-devel. Here is a complete list of modules and their minimum versions. Some modules have special installation notes, which follow. Required Perl modules: 1. AppConfig (1.52) 2. CGI (2.93) 3. Data::Dumper (any) 4. Date::Format (2.21) 5. DBI (1.36) 6. DBD::mysql (2.1010) 7. File::Spec (0.82) 8. File::Temp (any) 9. Template (2.08) 10. Text::Wrap (2001.0131) Optional Perl modules: 1. GD (1.20) for bug charting 2. Chart::Base (1.0) for bug charting 3. GD::Graph (any) for bug charting 4. GD::Text::Align (any) for bug charting 5. XML::Parser (any) for the XML interface 6. PatchReader (0.9.4) for pretty HTML view of patches 7. MIME::Parser (any) for the optional email interface _________________________________________________________________2.1.5.1. DBD::mysql The installation 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. A testing user of 'test', with a null password, should have sufficient access to run tests on the 'test' database which MySQL creates upon installation. _________________________________________________________________2.1.5.2. Template Toolkit (2.08) 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. _________________________________________________________________2.1.5.3. GD (1.20) The GD module is only required if you want graphical reports. Note The Perl GD module 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 module README. If compiling GD fails, it's probably because you're missing a required library. Tip The version of the GD 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 module won't work for you. _________________________________________________________________2.1.5.4. Chart::Base (1.0) The Chart::Base module is only required if you want graphical reports. Note that earlier versions that 0.99c used GIFs, which are no longer supported by the latest versions of GD. _________________________________________________________________2.1.5.5. GD::Graph (any) The GD::Graph module is only required if you want graphical reports. _________________________________________________________________2.1.5.6. GD::Text::Align (any) The GD::Text::Align module is only required if you want graphical reports. _________________________________________________________________2.1.5.7. XML::Parser (any) The XML::Parser module is only required if you want to import XML bugs using the importxml.pl script. This is required to use Bugzilla's "move bugs" feature; you may also want to use it for migrating from another bug database. XML::Parser requires that the expat library is already installed on your machine. _________________________________________________________________2.1.5.8. MIME::Parser (any) The MIME::Parser module is only required if you want to use the email interface located in the contrib directory. _________________________________________________________________2.1.5.9. PatchReader (0.9.4) The PatchReader module is only required if you want to use Patch Viewer, a Bugzilla feature to show code patches in your web browser in a more readable form. _________________________________________________________________2.1.6. Mail Transfer Agent (MTA) Bugzilla is dependent on the availability of an e-mail system for its user authentication and for other tasks. On Linux, any Sendmail-compatible MTA (Mail Transfer Agent) will suffice. Sendmail, Postfix, qmail and Exim are examples of common MTAs. Sendmail is the original Unix MTA, but the others are easier to configure, and therefore many people replace Sendmail with Postfix or Exim. They are drop-in replacements, so that Bugzilla will not distinguish between them. If you are using Sendmail, version 8.7 or higher is required. If you are using a Sendmail-compatible MTA, it must be congruent with at least version 8.7 of Sendmail. Consult the manual for the specific MTA you choose for detailed installation instructions. Each of these programs will have their own configuration files where you must configure certain parameters to ensure that the mail is delivered properly. They are implemented as services, and you should ensure that the MTA is in the auto-start list of services for the machine. If a simple mail sent with the command-line 'mail' program succeeds, then Bugzilla should also be fine. _________________________________________________________________2.2. Configuration Warning Poorly-configured MySQL and Bugzilla installations have given attackers full access to systems in the past. Please take the security parts of these guidelines seriously, even for Bugzilla machines hidden away behind your firewall. Be certain to read Chapter 4 for some important security tips. _________________________________________________________________2.2.1. localconfig Once you run checksetup.pl with all the correct modules installed, it displays a message about, and write out a file called, localconfig. This file contains the default settings for a number of Bugzilla parameters. Load this file in your editor. The only value you need to change is $db_pass, the password for the user you will create for your database. Pick a strong password (for simplicity, it should not contain single quote characters) and put it here. The other options in the localconfig file are documented by their accompanying comments. If you have a slightly non-standard MySQL setup, you may wish to change one or more of the other "$db_*" parameters. You may also wish to change the names of the priorities, severities, operating systems and platforms for your installation. However, you can always change these after installation has finished; if you then re-run checksetup.pl, the changes will get picked up. _________________________________________________________________2.2.2. MySQL Caution MySQL's default configuration is very insecure. Section 4.2 has some good information for improving your installation's security. _________________________________________________________________2.2.2.1. Allow large attachments By default, MySQL will only accept packets up to 64Kb in size. If you want to have attachments larger than this, you will need to modify your /etc/my.cnf as below. If you are using MySQL 4.0 or newer, enter: [mysqld] # Allow packets up to 1M max_allowed_packet=1M If you are using an older version of MySQL, enter: [mysqld] # Allow packets up to 1M set-variable = max_allowed_packet=1M
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -