Bugzilla:Win32Install: Difference between revisions

Reverting the last few changes. Useless and confusing information has been added by some contributors
(Reverting the last few changes. Useless and confusing information has been added by some contributors)
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 93: Line 91:
====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 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.
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</b>.


====Create Bugs Database and User====
====Create Bugs Database and User====
Line 99: Line 97:
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&gt;<b>mysql --user=root -p mysql</b>
Note in the following example 'sockmonkey' is my password for the bugs account:
 
  C:\mysql\bin&gt;<b>mysql --user=root -p mysql</b>
   
   
  Enter password: <b>sockmonkey</b>
  Enter password: <b>********</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 2
  Your MySQL connection id is 15 to server version: 4.0.20a-debug
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 122: Line 121:
  Bye
  Bye
   
   
  C:\Program Files\MySQL\MySQL Server 5.0\bin&gt;
  C:\mysql\bin&gt;


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&gt;<b>mysql --user=root -p mysql</b>
  C:\mysql\bin&gt;<b>mysql --user=root -p mysql</b>
  Enter password: <b>sockmonkey</b>
  Enter password: <b>********</b>
   
   
  Welcome to the MySQL monitor.  Commands end with ; or \g.
  Welcome to the MySQL monitor.  Commands end with ; or \g.
Line 177: Line 176:
====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). You should use PPM program install them from Internet into your local computer. Later you will see an example (Example 1) with details.
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).


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].


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.
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].
 
While, up to now, you still do not know which perl modules should be installed. To know this, use command below:
 
C:\Bugzilla&gt;<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:\&gt;<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:\&gt;<b>ppm install TimeDate </b>
 
instead of
 
C:\&gt;<b>ppm</b>
ppm&gt; <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:\&gt;<b>ppm</b>
  C:\&gt;<b>ppm</b>
Line 248: Line 192:
  Type 'help' to get started.
  Type 'help' to get started.
   
   
  ppm&gt; <b>rep add Bugzilla http://theoryx5.uwinnipeg.ca/ppms/</b>
  ppm&gt; <b>rep add Bugzilla http://...uwinnipeg.ca/...</b>
   
   
  Repositories:
  Repositories:
Line 354: Line 298:
  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&gt;
  ppm&gt;
And then, have a check:
C:\Bugzilla&gt;<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&gt;<b>ppm install CGI.pm.ppd</b>
C:\perl_modules&gt;<b>ppm install TimeDate.ppd</b>
C:\perl_modules&gt;<b>ppm install AppConfig.ppd</b>
C:\perl_modules&gt;<b>ppm install Template-Toolkit.ppd</b>
C:\perl_modules&gt;<b>ppm install Return-Value.ppd</b>
C:\perl_modules&gt;<b>ppm install Email-Address.ppd</b>
C:\perl_modules&gt;<b>ppm install Email-Simple.ppd</b>
C:\perl_modules&gt;<b>ppm install Email-Send.ppd</b>
C:\perl_modules&gt;<b>ppm install Email-MIME-ContentType.ppd</b>
C:\perl_modules&gt;<b>ppm install Email-MIME-Encodings.ppd</b>
C:\perl_modules&gt;<b>ppm install MIME-Types.ppd</b>
C:\perl_modules&gt;<b>ppm install Email-MIME.ppd</b>
C:\perl_modules&gt;<b>ppm install Email-MessageID.ppd</b>
C:\perl_modules&gt;<b>ppm install EMail-MIME-Modifier.ppd</b>
C:\perl_modules&gt;<b>ppm install DBD-mysql.ppd</b>
Step 4: Run <b>checksetup.pl</b> to have a check.
C:\Bugzilla&gt;<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/3.2/en/html/configuration.html#http-iis configuration instructions] in the Bugzilla documentation.
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.20/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). Let's say you downloaded version 2.2.
Download the Apache HTTP Server version 2.x or high from: http://httpd.apache.org/download.cgi (5.8 Meg).


====Install====
====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, <b>C:\Program Files\Apache Software Foundation\Apache2.2</b>.
Yet another standard Windows Installer.  Just follow the prompts, making sure you Install for All Users. Be aware the Apache will always install itself into an <b>Apache2</b> directory under what ever path you specify.  The default install path will be displayed as <b>C:\Program Files\Apache Group</b> which will result in Apache being installed to <b>C:\Program Files\Apache Group\Apache2</b>.  This gets me every time.
 
For the remainder of this document I will assume you installed Apache into the default location, <b>C:\Program Files\Apache Group\Apache2</b>.


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 434: Line 322:


*C:\Bugzilla\data
*C:\Bugzilla\data
*C:\Program Files\Apache Software Foundation\Apache2.2\logs
*C:\Program Files\Apache Group\Apache2\logs
*C:\Temp
*C:\Temp


Line 441: Line 329:
====Configure Port and DocumentRoot====
====Configure Port and DocumentRoot====


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.
Edit <b>C:\Program Files\Apache Group\Apache2\conf\httpd.conf</b> with your [http://www.vim.org/ favourite text editor].


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 523: Line 411:
  #
  #
  # 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/2.2/mod/core.html#options
  # http://httpd.apache.org/docs-2.0/mod/core.html#options
  # for more information.
  # for more information.
  #
  #
Line 562: Line 450:
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>
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 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|300px|Regedit]]
[[Image:Bugzilla-Regedit.png|100px|Regedit]]


====Disable Logging====
====Disable Logging====
Line 592: Line 469:
====Restart Apache====
====Restart Apache====


Finally, restart Apache to get it pick up the changes. Here take
Finally, restart Apache to get it pick up the changes.


  C:\&gt;<b>net stop apache2.2</b>
  C:\&gt;<b>net stop apache2</b>
  The Apache2.2 service is stopping..
  The Apache2 service is stopping..
  The Apache2.2 service was stopped successfully.
  The Apache2 service was stopped successfully.
   
   
  C:\&gt;<b>net start apache2.2</b>
  C:\&gt;<b>net start apache2</b>
  The Apache2.2 service is starting.
  The Apache2 service is starting.
  The Apache2.2 service was started successfully.
  The Apache2 service was started successfully.
   
   
  C:\&gt;
  C:\&gt;
Line 613: Line 490:


===Configure Bugzilla===
===Configure Bugzilla===
====checksetup.pl====
Run <b>checksetup.pl</b>.  This will check your Perl modules and create <b>localconfig</b>.
C:\&gt;<b>cd bugzilla</b>
C:\bugzilla&gt;<b>perl checksetup.pl</b>
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 ...
This version of Bugzilla contains some variables that you may want
to change and adapt to your local settings. Please edit the file
'./localconfig' and rerun checksetup.pl
The following variables are new to localconfig since you last ran
checksetup.pl:  index_html cvsbin interdiffbin diffpath create_htaccess
webservergroup db_driver db_host db_pass db_sock db_check
C:\bugzilla&gt;


====Edit localconfig====
====Edit localconfig====
Line 638: Line 562:
====checksetup.pl====
====checksetup.pl====


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.  
Run <b>checksetup.pl</b> again.  This time it will build your database tables and initialise Bugzilla.


  C:\bugzilla&gt;perl checksetup.pl
  C:\bugzilla&gt;perl checksetup.pl
Line 747: Line 671:
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 showed up, click link <b>Parameters</b>. In the new page of parameters setting, put in your email address as the <b>maintainer</b>.
In the page footer, choose <b>Parameters</b>.
 
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.
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>
Download and install WebDot from http://www.graphviz.org/Download_windows.php.  Put the complete path to dot.exe in <b>webdotbase</b>.
webdotbase:
<b>C:/Program Files/ATT/Graphviz/bin/dot.exe</b>


===Scheduled Tasks===
===Scheduled Tasks===
Confirmed users
683

edits