Bugzilla:Win32Install: Difference between revisions
m (→Apache) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 76: | Line 76: | ||
Extract the archive to the directory of your choice. For the remainder of this document I will assume that you have extracted Bugzilla into <b>C:\Bugzilla</b>. | Extract the archive to the directory of your choice. For the remainder of this document I will assume that you have extracted Bugzilla into <b>C:\Bugzilla</b>. | ||
Have a check after you extracted it, as you probably extracted it to location such as <b>C:\Bugzilla\bugzilla-3.3.2</b> which is not what you want. | |||
====Upgrading From TarBall==== | ====Upgrading From TarBall==== | ||
Line 91: | Line 93: | ||
====Install==== | ====Install==== | ||
MySQL has a standard Windows installer. It's ok to select a Typical MySQL install (the default). For the remainder of this document I will assume you have installed MySQL into <b>C:\ | MySQL has a standard Windows installer. It's ok to select a Typical MySQL install (the default). For the remainder of this document I will assume you have installed MySQL into default location <b>C:\Program Files\MySQL\MySQL Server 5.0</b>, with default port number <b>3306</b>, and password <b>sockmonkey</b> which is my favorite. | ||
====Create Bugs Database and User==== | ====Create Bugs Database and User==== | ||
Line 97: | Line 99: | ||
Use the <b>mysql</b> command line utility to create the Bugzilla database and a MySQL account for Bugzilla. | Use the <b>mysql</b> command line utility to create the Bugzilla database and a MySQL account for Bugzilla. | ||
C:\Program Files\MySQL\MySQL Server 5.0\bin><b>mysql --user=root -p mysql</b> | |||
C:\ | |||
Enter password: <b> | Enter password: <b>sockmonkey</b> | ||
Welcome to the MySQL monitor. Commands end with ; or \g. | Welcome to the MySQL monitor. Commands end with ; or \g. | ||
Your MySQL connection id is | Your MySQL connection id is 2 | ||
Server version: 5.0.67-community-nt MySQL Community Edition (GPL) | |||
Type 'help;' or '\h' for help. Type '\c' to clear the buffer. | Type 'help;' or '\h' for help. Type '\c' to clear the buffer. | ||
Line 121: | Line 122: | ||
Bye | Bye | ||
C:\ | C:\Program Files\MySQL\MySQL Server 5.0\bin> | ||
If you are running MySQL 4.1, you may encounter the <b>Client does not support authentication protocol requested by server</b> error message. To fix this, once the user has been created you will have to reset the password using OLD_PASSWORD: | If you are running MySQL 4.1, you may encounter the <b>Client does not support authentication protocol requested by server</b> error message. To fix this, once the user has been created you will have to reset the password using OLD_PASSWORD: | ||
C:\mysql\bin><b>mysql --user=root -p mysql</b> | C:\mysql\bin><b>mysql --user=root -p mysql</b> | ||
Enter password: <b> | Enter password: <b>sockmonkey</b> | ||
Welcome to the MySQL monitor. Commands end with ; or \g. | Welcome to the MySQL monitor. Commands end with ; or \g. | ||
Line 176: | Line 177: | ||
====Install Modules==== | ====Install Modules==== | ||
Bugzilla requires a number of perl modules to be installed. They are either available in the ActiveState repository, or at <b>http://theoryx5.uwinnipeg.ca/ppms/</b> (Perl 5.8.x) or <b>http://cpan.uwinnipeg.ca/PPMPackages/10xx/</b> (Perl 5.10.x). | Bugzilla requires a number of perl modules to be installed. They are either available in the ActiveState repository, or at <b>http://theoryx5.uwinnipeg.ca/ppms/</b> (Perl 5.8.x) or <b>http://cpan.uwinnipeg.ca/PPMPackages/10xx/</b> (Perl 5.10.x). You should use PPM program install them from Internet into your local computer. Later you will see an example (Example 1) with details. | ||
If you use a proxy server or a firewall you may have trouble running PPM. This is covered in the [http://aspn.activestate.com/ASPN/docs/ActivePerl/faq/ActivePerl-faq2.html#ppm_and_proxies ActivePerl FAQ]. | If you use a proxy server or a firewall you may have trouble running PPM. This is covered in the [http://aspn.activestate.com/ASPN/docs/ActivePerl/faq/ActivePerl-faq2.html#ppm_and_proxies ActivePerl FAQ]. | ||
The <b>Net::LDAP</b> module is only required if you want to [http://www.bugzilla.org/docs/tip/html/extraconfig.html#bzldap use Active Directory for authentication]. | If it still doesn't work, or you just don't like this way, you have another choice here. Instead of run PPM directly, you may download installation packages manually into your local computer firstly, and then run PPM to install them. These kind of installation packages are available in <b>http://cpan.uwinnipeg.ca/PPMPackages/10xx/zips/</b> (Perl 5.10.x). Later you will see an example (Example 2) with details for this kind of ppm local installation. | ||
While, up to now, you still do not know which perl modules should be installed. To know this, use command below: | |||
C:\Bugzilla><b>perl checksetup.pl --check-modules</b> | |||
Then the script will tell you which modules are needed, under this line: | |||
Checking perl modules... | |||
And which module is needed according to the database you use (MySQL), under this line: | |||
Checking available perl DBD modules... | |||
As well as which modules are optional, under this line: | |||
The following Perl modules are optional: | |||
The script will also tell you which modules are ok: | |||
Checking for PathTools (v0.84) ok: found v3.2501 | |||
And which modules are too old: | |||
Checking for CGI.pm (v3.33) found v3.29 | |||
As well as which modules were not installed yet: | |||
Checking for TimeDate (v2.21) not found | |||
You should install all the missing ones, and re-install all the out-of-date ones. | |||
But that's not enough. As perl modules have dependencies among each other, when you install a perl module, the ppm program may tell you that some dependent modules are missing. Then you have to install these dependent modules firstly. | |||
=====Example 1: 'Standard' PPM installation===== | |||
Here we provide an exmaple of 'standard' installation method. The ppm program will get modules from internet and install them into your local computer. | |||
Note 1: This example is a bit out-of-date. In recent ActiveState Perl version (v5.10.x), when you type | |||
C:\><b>ppm</b> | |||
The GUI will pop up instead of command line environment showed in this example. While, it's still possible to run under command line. Try | |||
C:\><b>ppm install TimeDate </b> | |||
instead of | |||
C:\><b>ppm</b> | |||
ppm> <b>install TimeDate</b> | |||
Note 2: The module list below may not correct for you. Pls use script <b>checksetup.pl</b> to have a check. See below. | |||
Note 3: The <b>Net::LDAP</b> module is only required if you want to [http://www.bugzilla.org/docs/tip/html/extraconfig.html#bzldap use Active Directory for authentication]. | |||
OK. Here is the example: | |||
C:\><b>ppm</b> | C:\><b>ppm</b> | ||
Line 192: | Line 248: | ||
Type 'help' to get started. | Type 'help' to get started. | ||
ppm> <b>rep add Bugzilla http:// | ppm> <b>rep add Bugzilla http://theoryx5.uwinnipeg.ca/ppms/</b> | ||
Repositories: | Repositories: | ||
Line 298: | Line 354: | ||
Successfully installed Net-LDAP-Express version 0.11 in ActivePerl 5.8.7.813. | Successfully installed Net-LDAP-Express version 0.11 in ActivePerl 5.8.7.813. | ||
ppm> | ppm> | ||
And then, have a check: | |||
C:\Bugzilla><b>perl checksetup.pl --check-modules</b> | |||
=====Example 2: PPM local installation===== | |||
As mentioned above, instead of run PPM directly, you may download installation packages into your local computer, and then run PPM to install them. | |||
Note: Again, the module list below may not correct for you. Pls use script <b>checksetup.pl</b> to have a check. See belew. | |||
Step 1: Download installation packages from <b>http://cpan.uwinnipeg.ca/PPMPackages/10xx/zips/</b> (for Perl 5.10.x). Below is the sorted list: | |||
AppConfig.zip | |||
CGI.pm.zip | |||
DBD-mysql.zip | |||
Email-Address.zip | |||
Email-MessageID.zip | |||
Email-MIME.zip | |||
Email-MIME-ContentType.zip | |||
Email-MIME-Encodings.zip | |||
EMail-MIME-Modifier.zip | |||
Email-Send.zip | |||
Email-Simple.zip | |||
MIME-Types.zip | |||
Return-Value.zip | |||
Template-Toolkit.zip | |||
TimeDate.zip | |||
Let's say you downloaded them into folder <b>C:\perl_modules</b>. | |||
Step 2: Unpack the zip packages. Each zip file will be unpacked into 3 files: xxx.tar.gz, xxx.ppd, and a readme file. The readme file is not so valuable that you could throw it away. | |||
Let's say you extracted all tar.gz files and ppd files into folder <b>C:\perl_modules</b>. | |||
Step 3: Run ppm commands listed below. Keep in this order, or you will probably meet dependency problem: | |||
C:\perl_modules><b>ppm install CGI.pm.ppd</b> | |||
C:\perl_modules><b>ppm install TimeDate.ppd</b> | |||
C:\perl_modules><b>ppm install AppConfig.ppd</b> | |||
C:\perl_modules><b>ppm install Template-Toolkit.ppd</b> | |||
C:\perl_modules><b>ppm install Return-Value.ppd</b> | |||
C:\perl_modules><b>ppm install Email-Address.ppd</b> | |||
C:\perl_modules><b>ppm install Email-Simple.ppd</b> | |||
C:\perl_modules><b>ppm install Email-Send.ppd</b> | |||
C:\perl_modules><b>ppm install Email-MIME-ContentType.ppd</b> | |||
C:\perl_modules><b>ppm install Email-MIME-Encodings.ppd</b> | |||
C:\perl_modules><b>ppm install MIME-Types.ppd</b> | |||
C:\perl_modules><b>ppm install Email-MIME.ppd</b> | |||
C:\perl_modules><b>ppm install Email-MessageID.ppd</b> | |||
C:\perl_modules><b>ppm install EMail-MIME-Modifier.ppd</b> | |||
C:\perl_modules><b>ppm install DBD-mysql.ppd</b> | |||
Step 4: Run <b>checksetup.pl</b> to have a check. | |||
C:\Bugzilla><b>perl checksetup.pl --check-modules</b> | |||
===Apache=== | ===Apache=== | ||
It is recommended that you run Bugzilla with the Apache web server. If you want to use IIS to run Bugzilla, there are [http://www.bugzilla.org/docs/2 | It is recommended that you run Bugzilla with the Apache web server. If you want to use IIS to run Bugzilla, there are [http://www.bugzilla.org/docs/3.2/en/html/configuration.html#http-iis configuration instructions] in the Bugzilla documentation. | ||
====Download Apache 2.x==== | ====Download Apache 2.x==== | ||
Download the Apache HTTP Server version 2.x or high from: http://httpd.apache.org/download.cgi (5.8 Meg). | Download the Apache HTTP Server version 2.x or high from: http://httpd.apache.org/download.cgi (5.8 Meg). Let's say you downloaded version 2.2. | ||
====Install==== | ====Install==== | ||
Yet another standard Windows Installer. Just follow the prompts, making sure you Install for All Users. | Yet another standard Windows Installer. Just follow the prompts, making sure you Install for All Users. For the remainder of this document I will assume you installed Apache into the default location, <b>C:\Program Files\Apache Software Foundation\Apache2.2</b>. | ||
For the remainder of this document I will assume you installed Apache into the default location, <b>C:\Program Files\Apache | |||
If you are already running IIS, you must configure apache to run on a port other than 80, however you aren't asked the port to listen on at install time. Choose <b>All Users</b> (which says port 80), and we'll change the port later. | If you are already running IIS, you must configure apache to run on a port other than 80, however you aren't asked the port to listen on at install time. Choose <b>All Users</b> (which says port 80), and we'll change the port later. | ||
Line 322: | Line 434: | ||
*C:\Bugzilla\data | *C:\Bugzilla\data | ||
*C:\Program Files\Apache | *C:\Program Files\Apache Software Foundation\Apache2.2\logs | ||
*C:\Temp | *C:\Temp | ||
Line 329: | Line 441: | ||
====Configure Port and DocumentRoot==== | ====Configure Port and DocumentRoot==== | ||
Edit <b>C:\Program Files\Apache | Edit <b>C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf</b> with your [http://www.vim.org/ favourite text editor]. It's a good idea to backup it before edit. | ||
To change the port that Apache runs on (listens on, or binds to), edit the <b>Listen</b> option. | To change the port that Apache runs on (listens on, or binds to), edit the <b>Listen</b> option. | ||
Line 411: | Line 523: | ||
# | # | ||
# The Options directive is both complicated and important. Please see | # The Options directive is both complicated and important. Please see | ||
# http://httpd.apache.org/docs | # http://httpd.apache.org/docs/2.2/mod/core.html#options | ||
# for more information. | # for more information. | ||
# | # | ||
Line 450: | Line 562: | ||
In order for <b>ScriptInterpreterSource Registry-Strict</b> to work, you also need to add an entry to the Registry so Apache will use Perl to execute .cgi files. | In order for <b>ScriptInterpreterSource Registry-Strict</b> to work, you also need to add an entry to the Registry so Apache will use Perl to execute .cgi files. | ||
In command line environment, type <b>regedit</b> to open Microsoft Registory Editor GUI. In Microsoft Registory Editor, create a key <b>HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command</b> with the default value of the full path of perl.exe with a -t (or -T to be safer) parameter. For example <b>C:\Perl\bin\perl.exe -t</b> | |||
To test that this works, you can execute the index.cgi file at C:\Bugzilla and see if it creates the html page. An alternate way to set up the registry settings is to perform this two-step: First, use the windows gui to set up the file association for the .cgi file extension. Second, modify the registry text to add the -t option to the perl.exe line. | |||
In detail then, first, execute the index.cgi either on the command line or in the windows GUI by double-clicking. Since you haven't done the registry change with Shell\ExecCGI\Command mentioned above, windows will prompt you to identify what executable should be associated with .cgi files. Tell it the C:\perl\bin\perl.exe file is the correct executable. | |||
Second, use regedit to add the -t option like this. The HKEY_CLASSES_ROOT\.cgi will be set up with a cgi_auto_file. The cgi_auto_file (search for it with regedit) sets up cgi_auto_file\shell\open\command\(default) with a REG_SZ containing a command line text. Note well how the double-quotes are set up. | |||
Change | |||
"C:\perl\bin\perl.exe" "%1" | |||
into | |||
"C:\perl\bin\perl.exe" -t "%1" | |||
You must have this -t added in correctly in order for Bugzilla to work. After adding it, you can test this part of the setup by trying to execute index.cgi at the command prompt and see if html is generated. | |||
[[Image:Bugzilla-Regedit.png| | [[Image:Bugzilla-Regedit.png|300px|Regedit]] | ||
====Disable Logging==== | ====Disable Logging==== | ||
Line 469: | Line 592: | ||
====Restart Apache==== | ====Restart Apache==== | ||
Finally, restart Apache to get it pick up the changes. | Finally, restart Apache to get it pick up the changes. Here take | ||
C:\><b>net stop apache2</b> | C:\><b>net stop apache2.2</b> | ||
The Apache2 service is stopping.. | The Apache2.2 service is stopping.. | ||
The Apache2 service was stopped successfully. | The Apache2.2 service was stopped successfully. | ||
C:\><b>net start apache2</b> | C:\><b>net start apache2.2</b> | ||
The Apache2 service is starting. | The Apache2.2 service is starting. | ||
The Apache2 service was started successfully. | The Apache2.2 service was started successfully. | ||
C:\> | C:\> | ||
Line 490: | Line 613: | ||
===Configure Bugzilla=== | ===Configure Bugzilla=== | ||
====Edit localconfig==== | ====Edit localconfig==== | ||
Line 562: | Line 638: | ||
====checksetup.pl==== | ====checksetup.pl==== | ||
Run <b>checksetup.pl</b> again. This time it will build your database tables and initialise Bugzilla. | Run <b>checksetup.pl</b> again. This time it will build your database tables and initialise Bugzilla. You will be asked several questions during this script run. You should answer them seriously, typing in true information. For the question "your SMTP server's hostname", you may contact your IT colleagues for hint if you are working for your company now. Generally a company always has at least one internal SMTP server. | ||
C:\bugzilla>perl checksetup.pl | C:\bugzilla>perl checksetup.pl | ||
Line 671: | Line 747: | ||
You should now be able to log into to Bugzilla using the account <b>checksetup.pl</b> just created. Point your web browser to >http://localhost/, choose <b>Log in to an existing account</b>, and login. | You should now be able to log into to Bugzilla using the account <b>checksetup.pl</b> just created. Point your web browser to >http://localhost/, choose <b>Log in to an existing account</b>, and login. | ||
In the page | In the page showed up, click link <b>Parameters</b>. In the new page of parameters setting, put in your email address as the <b>maintainer</b>. | ||
maintainer: | maintainer: | ||
<b>byron@example.com</b> | <b>byron@example.com</b> | ||
And put in the URL to Bugzilla in the <b>urlbase</b> field. This URL will be used in emails, so don't use localhost. | |||
urlbase: | urlbase: | ||
<b>http://bugzilla.example.com/</b> | <b>http://bugzilla.example.com/</b> | ||
===Scheduled Tasks=== | ===Scheduled Tasks=== |
Revision as of 14:52, 31 May 2009
Installing Bugzilla on Microsoft Windows
Original author: Byron Jones
Bugzilla version 2.18 was the first release that runs unmodified on Windows. This document guides you step by step through the installation process.
Note that there are a few things that don't work very well on Windows, such as mod_perl.
Bugzilla
There's two main methods to getting the Bugzilla source - from CVS or in a tarball. The best method for fetching Bugzilla is to grab it directly from CVS, as this will allow for simple upgrades, even if you have customised Bugzilla.
Read the Release Notes before you do anything.
Installing Bugzilla From CVS
Download the CVSNT client from [1] (2.15 Meg).
Run the installation, you'll only need to install the Command line client and the Password Server (:pserver:) Protocol. Once the install has completed, log out and log in again to pick up the changes to the PATH.
Note: this document assumes you want to install Bugzilla into C:\Bugzilla.
Open the command line, and cd to the parent of the directory you want to install Bugzilla into. As we'll be installing Bugzilla into C:\Bugzilla, the current directory must be C:\.
C:\>set CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot C:\>cvs login Logging in to :pserver:anonymous@cvs-mirror.mozilla.org:2401:/cvsroot CVS password: anonymous C:\>cvs checkout -d Bugzilla -rBugzilla_Stable Bugzilla cvs checkout: cwd=C:\ ,current=C:\ cvs checkout: Updating Bugzilla U Bugzilla/.cvsignore U Bugzilla/Bugzilla.pm ... U Bugzilla/template/en/default/whine/multipart-mime.txt.tmpl U Bugzilla/template/en/default/whine/schedule.html.tmpl cvs checkout: Updating Bugzilla/template/en/extension U Bugzilla/template/en/extension/filterexceptions.pl cvs checkout: Updating Bugzilla/template/en/extension/hook C:\>
Upgrading From CVS
If you've already installed an earlier version of Bugzilla from CVS or from a TarBall, updating is easy. Even if you've made customisations, CVS is smart enough to merge. If CVS needs help merging, it displays a C in the first column of its report. You need to resolve such conflicts manually.
C:\Bugzilla>cvs update -R -d -rBugzilla_Stable cvs update: Updating . P editusers.cgi cvs update: Updating Bugzilla P Bugzilla/Bug.pm P Bugzilla/BugMail.pm P Bugzilla/Chart.pm P Bugzilla/Flag.pm P Bugzilla/User.pm P Bugzilla/Util.pm cvs update: Updating Bugzilla/Auth U Bugzilla/Auth/CGI.pm cvs update: Updating Bugzilla/Template cvs update: Updating Bugzilla/Template/Plugin ... cvs update: Updating template/en/default/search cvs update: Updating template/en/default/whine cvs update: Updating template/en/extension C:\Bugzilla>
Installing Bugzilla From the TarBall
Download Bugzilla from [2] (2.4 Meg).
Bugzilla ships as a Tarball, which has the extension .tar.gz. Any decent Windows archive tool should be able to extract tarballs.
Extract the archive to the directory of your choice. For the remainder of this document I will assume that you have extracted Bugzilla into C:\Bugzilla.
Have a check after you extracted it, as you probably extracted it to location such as C:\Bugzilla\bugzilla-3.3.2 which is not what you want.
Upgrading From TarBall
If you installed Bugzilla from the TarBall, the simplest way to upgrade is to follow the CVS Upgrading instructions.
MySQL
Download MySQL
Download the MySQL "Windows Essentials" installer from http://dev.mysql.com/downloads/mysql/4.1.html (14.1 Meg).
MySQL 5.x is now stable enough and can be used.
Install
MySQL has a standard Windows installer. It's ok to select a Typical MySQL install (the default). For the remainder of this document I will assume you have installed MySQL into default location C:\Program Files\MySQL\MySQL Server 5.0, with default port number 3306, and password sockmonkey which is my favorite.
Create Bugs Database and User
Use the mysql command line utility to create the Bugzilla database and a MySQL account for Bugzilla.
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql --user=root -p mysql Enter password: sockmonkey Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.0.67-community-nt MySQL Community Edition (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create database bugs; Query OK, 1 row affected (0.11 sec) mysql> grant all privileges on bugs.* to 'bugs'@'localhost' identified by 'sockmonkey'; Query OK, 0 rows affected (0.03 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> quit Bye C:\Program Files\MySQL\MySQL Server 5.0\bin>
If you are running MySQL 4.1, you may encounter the Client does not support authentication protocol requested by server error message. To fix this, once the user has been created you will have to reset the password using OLD_PASSWORD:
C:\mysql\bin>mysql --user=root -p mysql Enter password: sockmonkey Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15 to server version: 4.1.11-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> set password for 'bugs'@'localhost' = OLD_PASSWORD('sockmonkey'); Query OK, 0 rows affected (0.00 sec) mysql> quit Bye C:\mysql\bin>
ActiveState Perl
Download ActiveState Perl 5.8.1 or Higher
Download the ActiveState Perl 5.8.1 or Higher MSI from: http://activestate.com/Products/Download/Download.plex?id=ActivePerl (12.5 Meg).
Note that Bugzilla requires ActiveState Perl 5.8.1 as it needs CGI.pm version 2.93 or higher. 5.8.0 ships with CGI.pm version 2.81, 5.8.1 ships with CGI.pm version 3.00.
There is a bug in Time::Local 1.10, which is shipped with ActiveState Perl 5.8.6, that will cause warnings to be generated at the top of every buglist. It's a good idea to avoid version 5.8.6 (version 5.8.4 works without issue).
Install
ActiveState Perl uses a standard Windows Installer. Install, sticking with the defaults, which will install Perl into C:\Perl.
Note: Installing Perl into a directory that contains a space (eg "C:\Program Files") will break the Template-Toolkit installer.
Once the install has completed, log out and log in again to pick up the changes to the PATH.
Upgrading Existing Installs
If you already have ActiveState Perl installed, now's a good time to ensure you're running the latest version of ActiveState Perl, along with the latest versions of the modules.
To upgrade ActiveState Perl, follow the directions at: http://aspn.activestate.com/ASPN/docs/ActivePerl/install.html
To upgrade your modules, simply run ppm upgrade
Create Temp Directory
On Windows, Perl has a hard time of locating the correct directory to write its temporary files (CGI.pm, File::Spec). Basically it has a list of paths hard coded to use, instead of querying Windows for the correct path.
To avoid problems, create the C:\Temp directory (it has to be on drive C) and ensure SYSTEM has write and modify access.
Install Modules
Bugzilla requires a number of perl modules to be installed. They are either available in the ActiveState repository, or at http://theoryx5.uwinnipeg.ca/ppms/ (Perl 5.8.x) or http://cpan.uwinnipeg.ca/PPMPackages/10xx/ (Perl 5.10.x). You should use PPM program install them from Internet into your local computer. Later you will see an example (Example 1) with details.
If you use a proxy server or a firewall you may have trouble running PPM. This is covered in the ActivePerl FAQ.
If it still doesn't work, or you just don't like this way, you have another choice here. Instead of run PPM directly, you may download installation packages manually into your local computer firstly, and then run PPM to install them. These kind of installation packages are available in http://cpan.uwinnipeg.ca/PPMPackages/10xx/zips/ (Perl 5.10.x). Later you will see an example (Example 2) with details for this kind of ppm local installation.
While, up to now, you still do not know which perl modules should be installed. To know this, use command below:
C:\Bugzilla>perl checksetup.pl --check-modules
Then the script will tell you which modules are needed, under this line:
Checking perl modules...
And which module is needed according to the database you use (MySQL), under this line:
Checking available perl DBD modules...
As well as which modules are optional, under this line:
The following Perl modules are optional:
The script will also tell you which modules are ok:
Checking for PathTools (v0.84) ok: found v3.2501
And which modules are too old:
Checking for CGI.pm (v3.33) found v3.29
As well as which modules were not installed yet:
Checking for TimeDate (v2.21) not found
You should install all the missing ones, and re-install all the out-of-date ones.
But that's not enough. As perl modules have dependencies among each other, when you install a perl module, the ppm program may tell you that some dependent modules are missing. Then you have to install these dependent modules firstly.
Example 1: 'Standard' PPM installation
Here we provide an exmaple of 'standard' installation method. The ppm program will get modules from internet and install them into your local computer.
Note 1: This example is a bit out-of-date. In recent ActiveState Perl version (v5.10.x), when you type
C:\>ppm
The GUI will pop up instead of command line environment showed in this example. While, it's still possible to run under command line. Try
C:\>ppm install TimeDate
instead of
C:\>ppm ppm> install TimeDate
Note 2: The module list below may not correct for you. Pls use script checksetup.pl to have a check. See below.
Note 3: The Net::LDAP module is only required if you want to use Active Directory for authentication.
OK. Here is the example:
C:\>ppm PPM - Programmer's Package Manager version 3.1. Copyright (c) 2001 ActiveState Corp. All Rights Reserved. ActiveState is a devision of Sophos. Entering interactive shell. Using Term::ReadLine::Stub as readline library. Type 'help' to get started. ppm> rep add Bugzilla http://theoryx5.uwinnipeg.ca/ppms/ Repositories: [1] ActiveState PPM2 Repository [2] ActiveState Package Repository [3] Bugzilla ppm> install AppConfig ==================== Install 'AppConfig' version 1.52 in ActivePerl 5.8.7.813. ==================== Downloaded 50508 bytes. ... Successfully installed AppConfig version 1.52 in ActivePerl 5.8.7.813. ppm> install TimeDate ==================== Install 'TimeDate' version 1.16 in ActivePerl 5.8.7.813. ==================== Downloaded 19235 bytes. ... Successfully installed TimeDate version 1.16 in ActivePerl 5.8.7.813. ppm> install DBI ==================== Install 'DBI' version 1.43 in ActivePerl 5.8.7.813. ==================== Downloaded 508164 bytes. ... Successfully installed DBI version 1.43 in ActivePerl 5.8.7.813. ppm> install DBD-mysql ==================== Install 'DBD-mysql' version 2.9002 in ActivePerl 5.8.7.813. ==================== Downloaded 178803 bytes. ... Successfully installed DBD-mysql version 2.9002 in ActivePerl 5.8.7.813. ppm> install Template-Toolkit ==================== Install 'Template-Toolkit' version 2.13 in ActivePerl 5.8.7.813. ==================== Downloaded 530770 bytes. ... Successfully installed Template-Toolkit version 2.13 in ActivePerl 5.8.7.813. ppm> install MailTools ==================== Install 'MailTools' version 1.67 in ActivePerl 5.8.7.813. ==================== Downloaded 46881 bytes. ... Successfully installed MailTools version 1.67 in ActivePerl 5.8.7.813. ppm> install GD ==================== Install 'GD' version 2.07 in ActivePerl 5.8.7.813. ==================== Downloaded 363039 bytes. ... Successfully installed GD version 2.07 in ActivePerl 5.8.7.813. ppm> install Chart ==================== Install 'Chart' version 2.3 in ActivePerl 5.8.7.813. ==================== Downloaded 58641 bytes. ... Successfully installed Chart version 2.3 in ActivePerl 5.8.7.813. ppm> install GDGraph ==================== Install 'GDTextUtil' version 0.86 in ActivePerl 5.8.7.813. ==================== Downloaded 19178 bytes. ... Successfully installed GDTextUtil version 0.86 in ActivePerl 5.8.7.813. ==================== Install 'GDGraph' version 1.43 in ActivePerl 5.8.7.813. ==================== Downloaded 71764 bytes. ... Successfully installed GDGraph version 1.43 in ActivePerl 5.8.7.813. ppm> install PatchReader ==================== Install 'PatchReader' version 0.9.4 in ActivePerl 5.8.7.813. ==================== Downloaded 9558 bytes. ... Successfully installed PatchReader version 0.9.4 in ActivePerl 5.8.7.813. ppm> install Net::LDAP ==================== Install 'Convert-ASN1' version 0.19 in ActivePerl 5.8.7.813. ==================== Downloaded 26326 bytes. ... Successfully installed Convert-ASN1 version 0.19 in ActivePerl 5.8.7.813. ==================== Install 'perl-ldap' version 0.33 in ActivePerl 5.8.7.813. ==================== Downloaded 188548 bytes. ... Successfully installed perl-ldap version 0.33 in ActivePerl 5.8.7.813. ==================== Install 'Net-LDAP-Express' version 0.11 in ActivePerl 5.8.7.813. ==================== Downloaded 7693 bytes. ... Successfully installed Net-LDAP-Express version 0.11 in ActivePerl 5.8.7.813. ppm>
And then, have a check:
C:\Bugzilla>perl checksetup.pl --check-modules
Example 2: PPM local installation
As mentioned above, instead of run PPM directly, you may download installation packages into your local computer, and then run PPM to install them.
Note: Again, the module list below may not correct for you. Pls use script checksetup.pl to have a check. See belew.
Step 1: Download installation packages from http://cpan.uwinnipeg.ca/PPMPackages/10xx/zips/ (for Perl 5.10.x). Below is the sorted list:
AppConfig.zip CGI.pm.zip DBD-mysql.zip Email-Address.zip Email-MessageID.zip Email-MIME.zip Email-MIME-ContentType.zip Email-MIME-Encodings.zip EMail-MIME-Modifier.zip Email-Send.zip Email-Simple.zip MIME-Types.zip Return-Value.zip Template-Toolkit.zip TimeDate.zip
Let's say you downloaded them into folder C:\perl_modules.
Step 2: Unpack the zip packages. Each zip file will be unpacked into 3 files: xxx.tar.gz, xxx.ppd, and a readme file. The readme file is not so valuable that you could throw it away.
Let's say you extracted all tar.gz files and ppd files into folder C:\perl_modules.
Step 3: Run ppm commands listed below. Keep in this order, or you will probably meet dependency problem:
C:\perl_modules>ppm install CGI.pm.ppd C:\perl_modules>ppm install TimeDate.ppd C:\perl_modules>ppm install AppConfig.ppd C:\perl_modules>ppm install Template-Toolkit.ppd C:\perl_modules>ppm install Return-Value.ppd C:\perl_modules>ppm install Email-Address.ppd C:\perl_modules>ppm install Email-Simple.ppd C:\perl_modules>ppm install Email-Send.ppd C:\perl_modules>ppm install Email-MIME-ContentType.ppd C:\perl_modules>ppm install Email-MIME-Encodings.ppd C:\perl_modules>ppm install MIME-Types.ppd C:\perl_modules>ppm install Email-MIME.ppd C:\perl_modules>ppm install Email-MessageID.ppd C:\perl_modules>ppm install EMail-MIME-Modifier.ppd C:\perl_modules>ppm install DBD-mysql.ppd
Step 4: Run checksetup.pl to have a check.
C:\Bugzilla>perl checksetup.pl --check-modules
Apache
It is recommended that you run Bugzilla with the Apache web server. If you want to use IIS to run Bugzilla, there are configuration instructions in the Bugzilla documentation.
Download Apache 2.x
Download the Apache HTTP Server version 2.x or high from: http://httpd.apache.org/download.cgi (5.8 Meg). Let's say you downloaded version 2.2.
Install
Yet another standard Windows Installer. Just follow the prompts, making sure you Install for All Users. For the remainder of this document I will assume you installed Apache into the default location, C:\Program Files\Apache Software Foundation\Apache2.2.
If you are already running IIS, you must configure apache to run on a port other than 80, however you aren't asked the port to listen on at install time. Choose All Users (which says port 80), and we'll change the port later.
By default Apache installs itself to run as the SYSTEM account. For security reasons it's better the reconfigure the service to run as an Apache user. Create a user that is a member of no groups, and reconfigure the Apache2 service to run as that account.
Grant write access for Apache account
By default Apache will run as the SYSTEM account. This account needs write and modify access to the following directorys, and all their subdirectories. Depending on your version of Windows, this access may already be granted.
- C:\Bugzilla\data
- C:\Program Files\Apache Software Foundation\Apache2.2\logs
- C:\Temp
Note that C:\Bugzilla\data is created the first time you run checksetup.pl.
Configure Port and DocumentRoot
Edit C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf with your favourite text editor. It's a good idea to backup it before edit.
To change the port that Apache runs on (listens on, or binds to), edit the Listen option.
# # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses (0.0.0.0) # #Listen 12.34.56.78:80 Listen 80
Change the DocumentRoot setting to point to C:\Bugzilla. Note there are two locations in httpd.conf that need to be updated. Note you need to use / instead of \ as a path separator.
# # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "C:/Bugzilla" # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the "default" to be a very restrictive set of # features. # <Directory /> Options FollowSymLinks AllowOverride None </Directory> # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # This should be changed to whatever you set DocumentRoot to. # <Directory "C:/Bugzilla">
Configure CGI
To enable CGI support in Apache, you need to enable the CGI handler, by uncommenting the AddHandler cgi-script .cgi line.
# # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # AddHandler cgi-script .cgi
And allow .cgi scripts in the Bugzilla directory by adding the ExecCGI option. We also need to allow Bugzilla's .htaccess file to restrict access to sensitive documents by allowing it to override the defaults. This involves changing AllowOverride None to AllowOverride All.
Apache also needs to know to use Perl to execute .cgi files, via the ScriptInterpreterSource directive.
# # This should be changed to whatever you set DocumentRoot to. # <Directory "C:/Bugzilla"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks ExecCGI # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All # # Controls who can get stuff from this server. # Order allow,deny Allow from all # # Tell Apache to use Perl to execute .cgi # ScriptInterpreterSource Registry-Strict </Directory>
You also should add index.cgi to the DirectoryIndex list.
# # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # # The index.html.var file (a type-map) is used to deliver content- # negotiated documents. The MultiViews Option can be used for the # same purpose, but it is much slower. # DirectoryIndex index.html index.html.var index.cgi
In order for ScriptInterpreterSource Registry-Strict to work, you also need to add an entry to the Registry so Apache will use Perl to execute .cgi files.
In command line environment, type regedit to open Microsoft Registory Editor GUI. In Microsoft Registory Editor, create a key HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command with the default value of the full path of perl.exe with a -t (or -T to be safer) parameter. For example C:\Perl\bin\perl.exe -t
To test that this works, you can execute the index.cgi file at C:\Bugzilla and see if it creates the html page. An alternate way to set up the registry settings is to perform this two-step: First, use the windows gui to set up the file association for the .cgi file extension. Second, modify the registry text to add the -t option to the perl.exe line.
In detail then, first, execute the index.cgi either on the command line or in the windows GUI by double-clicking. Since you haven't done the registry change with Shell\ExecCGI\Command mentioned above, windows will prompt you to identify what executable should be associated with .cgi files. Tell it the C:\perl\bin\perl.exe file is the correct executable.
Second, use regedit to add the -t option like this. The HKEY_CLASSES_ROOT\.cgi will be set up with a cgi_auto_file. The cgi_auto_file (search for it with regedit) sets up cgi_auto_file\shell\open\command\(default) with a REG_SZ containing a command line text. Note well how the double-quotes are set up. Change
"C:\perl\bin\perl.exe" "%1"
into
"C:\perl\bin\perl.exe" -t "%1"
You must have this -t added in correctly in order for Bugzilla to work. After adding it, you can test this part of the setup by trying to execute index.cgi at the command prompt and see if html is generated.
Disable Logging
Unless you want to keep statistics on how many hits your Bugzilla install is getting, it's a good idea to disable logging by commenting out the CustomLog directive.
# # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a <VirtualHost> # container, they will be logged here. Contrariwise, if you *do* # define per-<VirtualHost> access logfiles, transactions will be # logged therein and *not* in this file. # #CustomLog logs/access.log common
Restart Apache
Finally, restart Apache to get it pick up the changes. Here take
C:\>net stop apache2.2 The Apache2.2 service is stopping.. The Apache2.2 service was stopped successfully. C:\>net start apache2.2 The Apache2.2 service is starting. The Apache2.2 service was started successfully. C:\>
Extras
While Bugzilla 2.20 has built in support for SMTP servers, it doesn't (yet) support SMTP authentication or debugging of SMTP errors.
If you require SMTP authentiation (including POP before SMTP), you can use Glob's sendmail wrapper. Download and install as per the instructions on that site.
If you enable logging in Sendmail, you need to ensure that your Apache account has write access to C:\usr\lib.
Configure Bugzilla
Edit localconfig
Open C:\Bugzilla\localconfig in your favourite text editor to configure Bugzilla.
You have to tell Bugzilla how to access your database. If you used bugs/bugs, you'll only have to set db_pass.
# # How to access the SQL database: # $db_host = "localhost"; # where is the database? $db_port = 3306; # which port to use $db_name = "bugs"; # name of the MySQL database $db_user = "bugs"; # user to attach to the MySQL database # # Enter your database password here. It's normally advisable to specify # a password for your bugzilla database user. # If you use apostrophe (') or a backslash (\) in your password, you'll # need to escape it by preceding it with a \ character. (\') or (\\) # $db_pass = 'sockmonkey';
checksetup.pl
Run checksetup.pl again. This time it will build your database tables and initialise Bugzilla. You will be asked several questions during this script run. You should answer them seriously, typing in true information. For the question "your SMTP server's hostname", you may contact your IT colleagues for hint if you are working for your company now. Generally a company always has at least one internal SMTP server.
C:\bugzilla>perl checksetup.pl Checking perl modules ... Checking for AppConfig (v1.52) ok: found v1.55 Checking for CGI (v2.93) ok: found v3.10 Checking for Data::Dumper (any) ok: found v2.121_04 Checking for Date::Format (v2.21) ok: found v2.22 Checking for DBI (v1.38) ok: found v1.48 Checking for File::Spec (v0.84) ok: found v3.05 Checking for File::Temp (any) ok: found v0.16 Checking for Template (v2.08) ok: found v2.13 Checking for Text::Wrap (v2001.0131) ok: found v2001.09293 Checking for Mail::Mailer (v1.65) ok: found v1.67 Checking for Storable (any) ok: found v2.13 The following Perl modules are optional: Checking for GD (v1.20) ok: found v2.16 Checking for Chart::Base (v1.0) ok: found v2.3 Checking for XML::Parser (any) ok: found v2.34 Checking for GD::Graph (any) ok: found v1.43 Checking for GD::Text::Align (any) ok: found v1.18 Checking for PatchReader (v0.9.4) ok: found v0.9.5 Most ActivePerl modules are available at Apache's ppm repository. A list of mirrors is available at http://www.apache.org/dyn/closer.cgi/perl/win32-bin/ppms/ You can add the repository with the following command: ppm rep add apache http://www.apache.org/dist/perl/win32-bin/ppms/ Checking user setup ... Creating data directory (./data) ... Creating graphs directory... Creating .htaccess... Creating Bugzilla/.htaccess... Creating ./data/.htaccess... Creating ./template/.htaccess... Creating ./data/webdot/.htaccess... Precompiling templates ... Checking for MySQL Server (v3.23.41) ok: found v4.0.20a-debug Creating table user_group_map ... Creating table series_data ... Creating table longdescs ... Creating table dependencies ... Creating table components ... Creating table keywords ... Creating table cc ... Creating table duplicates ... Creating table groups ... Creating table flagtypes ... Creating table profiles ... Creating table products ... Creating table bugs_activity ... Creating table series_categories ... Creating table keyworddefs ... Creating table fielddefs ... Creating table group_control_map ... Creating table profiles_activity ... Creating table group_group_map ... Creating table user_series_map ... Creating table bugs ... Creating table series ... Creating table versions ... Creating table flagexclusions ... Creating table logincookies ... Creating table watch ... Creating table bug_group_map ... Creating table votes ... Creating table attachments ... Creating table flags ... Creating table milestones ... Creating table tokens ... Creating table flaginclusions ... Creating table quips ... Creating table namedqueries ... Creating initial dummy product 'TestProduct' ... Populating duplicates table... Creating duplicates directory... Migrating old chart data into database ... Adding group tweakparams ... Adding group editusers ... Adding group creategroups ... Adding group editcomponents ... Adding group editkeywords ... Adding group admin ... Adding group editbugs ... Adding group canconfirm ... 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 accidently been deleted. Enter the e-mail address of the administrator: byron@example.com You entered 'byron@example.com'. Is this correct? [Y/n] y Enter the real name of the administrator: Byron Jones Enter a password for the administrator account: beef Please retype the password to verify: beef 'byron@example.com' is now set up as an administrator account. C:\bugzilla>
Parameters
You should now be able to log into to Bugzilla using the account checksetup.pl just created. Point your web browser to >http://localhost/, choose Log in to an existing account, and login.
In the page showed up, click link Parameters. In the new page of parameters setting, put in your email address as the maintainer.
maintainer: byron@example.com
And put in the URL to Bugzilla in the urlbase field. This URL will be used in emails, so don't use localhost.
urlbase: http://bugzilla.example.com/
Scheduled Tasks
collectstats.pl
Add a Scheduled Task to run collectstats.pl nightly.
Step-by-step for Windows XP:
- Control Panel --> Scheduled Tasks --> Add Scheduled Task
- Next
- Browse
- Find perl.exe (normally C:\Perl\bin\perl.exe)
- Give it a name, such as "Bugzilla Collect Stats"
- Perfom the task daily at your desired time
- If you're running Apache as a user, not as SYSTEM, enter that user here. Otherwise you're best off creating an account that has write access to the Bugzilla directory and using that
- Tick "Open Advanced Properties.." and click Finish
- Append "-T" and the script name to the end of the "Run" field. eg C:\Perl\bin\perl.exe -T C:\Bugzilla\collectstats.pl
- Change "start in" to the Bugzilla directory
whineatnews.pl
Add a Scheduled Task to run whineatnews.pl nightly.
The steps for setting up whineatnews.pl are as per collectstats.pl
Backing up Bugzilla
You may want to backup the entire Bugzilla directory. It's small and you'll get all your settings and customisations on your backup media.
The most important component of Bugzilla to backup is the Bugzilla Database. It contains all your Bugs, Users, Attachments, pretty well everything. Like most databases, backups with MySql are performed by generating a dump of the database and backing up the dump.
Schedule the mysqldump utility to create the dump, and add the resulting file to your backup media. You'll find MySql's mysqldump documentation at http://dev.mysql.com/doc/mysql/en/mysqldump.html.