Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Lyo/BuildTRS4JBugzilla/BugzillaInstallation"

m
m
Line 7: Line 7:
 
The instruction of Bugzilla installation is available at Bugzilla documentation [http://www.bugzilla.org/docs/4.0/en/html/installing-bugzilla.html here]. This wiki page is a digest of the installation instruction, so if you will find the problems about the installation, please refer to the Bugzilla documentation.  
 
The instruction of Bugzilla installation is available at Bugzilla documentation [http://www.bugzilla.org/docs/4.0/en/html/installing-bugzilla.html here]. This wiki page is a digest of the installation instruction, so if you will find the problems about the installation, please refer to the Bugzilla documentation.  
  
Since TRS adapter for Bugzilla calls Bugzilla api many times, [http://perl.apache.org/ "mod_perl"] module, which is the embedded Perl interpreter in Apache web server,&nbsp; needs to be installed for the good performance. If you will follow the instruction below, this module is automatically installed.<br>
+
Since TRS adapter for Bugzilla calls Bugzilla api many times, [http://perl.apache.org/ "mod_perl"] module, which is the embedded Perl interpreter in Apache web server,&nbsp; needs to be installed for the good performance. If you will follow the instruction below, this module is automatically installed.<br>  
  
 
== Prerequisites  ==
 
== Prerequisites  ==
Line 43: Line 43:
  
 
#Login as Windows Administrator account.<br>  
 
#Login as Windows Administrator account.<br>  
 +
#set PATH=C:\xampp\apache\bin;C:\xampp\perl\bin;C:\strawberry\c\bin;%PATH%&nbsp; &nbsp;&nbsp; (if not being set before. )<br>
 
#Check the necessary modules are installed<br>&nbsp;&nbsp; '''cd C:\xampp\bugzilla-4.0.10'''<br>&nbsp;&nbsp; '''c:\xampp\perl\bin\perl.exe checksetup.pl --check-module'''  
 
#Check the necessary modules are installed<br>&nbsp;&nbsp; '''cd C:\xampp\bugzilla-4.0.10'''<br>&nbsp;&nbsp; '''c:\xampp\perl\bin\perl.exe checksetup.pl --check-module'''  
 
#Make sure you will see the following messages as the missing modules.<br>'''COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands and then re-run this script):<br><br>c:\xampp\perl\bin\perl.exe install-module.pl CGI<br> c:\xampp\perl\bin\perl.exe install-module.pl DateTime<br> c:\xampp\perl\bin\perl.exe install-module.pl DateTime::TimeZone<br> c:\xampp\perl\bin\perl.exe install-module.pl Template<br> c:\xampp\perl\bin\perl.exe install-module.pl Email::MIME<br> c:\xampp\perl\bin\perl.exe install-module.pl List::MoreUtils<br><br>To attempt an automatic install of every required and optional module with one command, do:<br>c:\xampp\perl\bin\perl.exe install-module.pl --all<br><br>*** Installation aborted. Read the messages above. ***'''<br><br>Also make sure that installed SOAP::Lite is old and Test::Taint is missing. For example,<br><br>'''Checking for SOAP-Lite (v0.712) found v0.710.10<br>[...]<br>Checking for Test-Taint (any) not found<br>'''<br>  
 
#Make sure you will see the following messages as the missing modules.<br>'''COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands and then re-run this script):<br><br>c:\xampp\perl\bin\perl.exe install-module.pl CGI<br> c:\xampp\perl\bin\perl.exe install-module.pl DateTime<br> c:\xampp\perl\bin\perl.exe install-module.pl DateTime::TimeZone<br> c:\xampp\perl\bin\perl.exe install-module.pl Template<br> c:\xampp\perl\bin\perl.exe install-module.pl Email::MIME<br> c:\xampp\perl\bin\perl.exe install-module.pl List::MoreUtils<br><br>To attempt an automatic install of every required and optional module with one command, do:<br>c:\xampp\perl\bin\perl.exe install-module.pl --all<br><br>*** Installation aborted. Read the messages above. ***'''<br><br>Also make sure that installed SOAP::Lite is old and Test::Taint is missing. For example,<br><br>'''Checking for SOAP-Lite (v0.712) found v0.710.10<br>[...]<br>Checking for Test-Taint (any) not found<br>'''<br>  
Line 51: Line 52:
 
##Edit Local.pm to change "TimeZone" subroutine to return the fixed time zone name. The time zone name, in the following case, 'Asia/Tokyo', is in the list of Win32.pm in C:\xampp\bugzilla-4.0.10\lib\DateTime\TimeZone\Local so you can pick the correct one from them.&nbsp; For example, the time zone names for US will be either <br><br>&nbsp;&nbsp;&nbsp; 'Eastern Standard Time' =&gt; ''''America/New_York''''<br>&nbsp;&nbsp;&nbsp; 'Central Standard Time' =&gt; ''''America/Chicago''''<br>&nbsp;&nbsp;&nbsp; 'Mountain Standard Time' =&gt; ''''America/Denver''''<br>&nbsp;&nbsp;&nbsp; 'Pacific Standard Time' =&gt; ''''America/Los_Angeles''''<br><br>The code change for, for example, Japan,&nbsp; is the following. <br><br>'''sub TimeZone {<br>'''''&nbsp;&nbsp;'''''&nbsp;&nbsp; return DateTime::TimeZone-&gt;new(name =&gt; 'Asia/Tokyo'); &nbsp; &nbsp; '''&lt;&lt; Change the code to return the fixed time zone name'''<br>#&nbsp;&nbsp; my $class = shift;&nbsp;''' &lt;&lt; Comment out this line'''<br># &nbsp; my $subclass = $class-&gt;_load_subclass();&nbsp; '''&lt;&lt; Comment out this line'''<br># &nbsp; for my $meth ( $subclass-&gt;Methods() ) {&nbsp; '''&lt;&lt; Comment out this line'''<br># &nbsp; &nbsp; &nbsp; &nbsp; my $tz = $subclass-&gt;$meth();&nbsp; ''' &lt;&lt; Comment out this line'''<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return $tz if $tz;&nbsp; '''&lt;&lt; Comment out this line'''<br># &nbsp; }&nbsp;&nbsp; ''' &lt;&lt; Comment out this line'''<br>#&nbsp;&nbsp; die "Cannot determine local time zone\n";&nbsp; '''&lt;&lt; Comment out this line'''<br>}'''<br><br>So you can change the time zone name accordingly. (For the bug information, please see [http://mozilla.6506.n7.nabble.com/bugzilla-4-0-quot-Cannot-determine-local-time-zone-quot-error-on-FreeBSD-with-correct-local-time-zone-td74789.html "Cannot determine local time zone" error] )<br><br>Note1: This time zone name will be used in Bugzilla preferences. See [[Lyo/BuildTRS4JBugzilla/BugzillaInstallation#Initial_Bugzilla_setup_for_the_TRS_Workshop|Initial Bugzilla setup for the TRS Workshop]] below.<br>Note2: Local.pm might be read-only, so you need to change its attribute before editing it. <br>
 
##Edit Local.pm to change "TimeZone" subroutine to return the fixed time zone name. The time zone name, in the following case, 'Asia/Tokyo', is in the list of Win32.pm in C:\xampp\bugzilla-4.0.10\lib\DateTime\TimeZone\Local so you can pick the correct one from them.&nbsp; For example, the time zone names for US will be either <br><br>&nbsp;&nbsp;&nbsp; 'Eastern Standard Time' =&gt; ''''America/New_York''''<br>&nbsp;&nbsp;&nbsp; 'Central Standard Time' =&gt; ''''America/Chicago''''<br>&nbsp;&nbsp;&nbsp; 'Mountain Standard Time' =&gt; ''''America/Denver''''<br>&nbsp;&nbsp;&nbsp; 'Pacific Standard Time' =&gt; ''''America/Los_Angeles''''<br><br>The code change for, for example, Japan,&nbsp; is the following. <br><br>'''sub TimeZone {<br>'''''&nbsp;&nbsp;'''''&nbsp;&nbsp; return DateTime::TimeZone-&gt;new(name =&gt; 'Asia/Tokyo'); &nbsp; &nbsp; '''&lt;&lt; Change the code to return the fixed time zone name'''<br>#&nbsp;&nbsp; my $class = shift;&nbsp;''' &lt;&lt; Comment out this line'''<br># &nbsp; my $subclass = $class-&gt;_load_subclass();&nbsp; '''&lt;&lt; Comment out this line'''<br># &nbsp; for my $meth ( $subclass-&gt;Methods() ) {&nbsp; '''&lt;&lt; Comment out this line'''<br># &nbsp; &nbsp; &nbsp; &nbsp; my $tz = $subclass-&gt;$meth();&nbsp; ''' &lt;&lt; Comment out this line'''<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return $tz if $tz;&nbsp; '''&lt;&lt; Comment out this line'''<br># &nbsp; }&nbsp;&nbsp; ''' &lt;&lt; Comment out this line'''<br>#&nbsp;&nbsp; die "Cannot determine local time zone\n";&nbsp; '''&lt;&lt; Comment out this line'''<br>}'''<br><br>So you can change the time zone name accordingly. (For the bug information, please see [http://mozilla.6506.n7.nabble.com/bugzilla-4-0-quot-Cannot-determine-local-time-zone-quot-error-on-FreeBSD-with-correct-local-time-zone-td74789.html "Cannot determine local time zone" error] )<br><br>Note1: This time zone name will be used in Bugzilla preferences. See [[Lyo/BuildTRS4JBugzilla/BugzillaInstallation#Initial_Bugzilla_setup_for_the_TRS_Workshop|Initial Bugzilla setup for the TRS Workshop]] below.<br>Note2: Local.pm might be read-only, so you need to change its attribute before editing it. <br>
  
<br>
+
<br>  
  
 
== Configure Apache  ==
 
== Configure Apache  ==
  
 
#Login as Windows Administrator account.<br>  
 
#Login as Windows Administrator account.<br>  
 +
#set PATH=C:\xampp\apache\bin;C:\xampp\perl\bin;C:\strawberry\c\bin;%PATH% &nbsp; &nbsp; (if not being set before. )<br>
 
#cd C:\xampp\apache\conf  
 
#cd C:\xampp\apache\conf  
#Edit httpd.conf to add the following three lines after the line of "Include "conf/extra/httpd-perl.conf"<br>&nbsp; # Perl settings<br>&nbsp; Include "conf/extra/httpd-perl.conf"<br>&nbsp;'''Alias /bugzilla "C:\xampp\bugzilla-4.0.10"''' &nbsp; &lt;&lt; Add this line<br>&nbsp; '''PerlSwitches -IC:\xampp\bugzilla-4.0.10 -w -T'''&nbsp;&nbsp; &nbsp; &lt;&lt; Add this line<br>&nbsp; '''PerlConfigRequire "C:\xampp\bugzilla-4.0.10\mod_perl.pl" '''&lt;&lt; Add this line
+
#Edit httpd.conf to add the following three lines after the line of "Include "conf/extra/httpd-perl.conf"<br>&nbsp; # Perl settings<br>&nbsp; Include "conf/extra/httpd-perl.conf"<br>&nbsp;'''Alias /bugzilla "C:\xampp\bugzilla-4.0.10"''' &nbsp; &lt;&lt; Add this line<br>&nbsp; '''PerlSwitches -IC:\xampp\bugzilla-4.0.10 -w -T'''&nbsp;&nbsp; &nbsp; &lt;&lt; Add this line<br>&nbsp; '''PerlConfigRequire "C:\xampp\bugzilla-4.0.10\mod_perl.pl" '''&lt;&lt; Add this line  
 
#Continued&nbsp;: comment out the following two lines.<br># First, we configure the "default" to be a very restrictive set of <br># features. <br>#<br>&nbsp; &lt;Directory /&gt;<br>&nbsp; &nbsp;&nbsp; Options FollowSymLinks<br>'''# &nbsp; AllowOverride None ''' &lt;&lt; Comment out this line<br>&nbsp;&nbsp;&nbsp;&nbsp; Order deny,allow<br>'''#&nbsp;&nbsp; Deny from all'''&nbsp;&nbsp; &lt;&lt; Comment out this line<br>&nbsp; &lt;/Directory&gt;  
 
#Continued&nbsp;: comment out the following two lines.<br># First, we configure the "default" to be a very restrictive set of <br># features. <br>#<br>&nbsp; &lt;Directory /&gt;<br>&nbsp; &nbsp;&nbsp; Options FollowSymLinks<br>'''# &nbsp; AllowOverride None ''' &lt;&lt; Comment out this line<br>&nbsp;&nbsp;&nbsp;&nbsp; Order deny,allow<br>'''#&nbsp;&nbsp; Deny from all'''&nbsp;&nbsp; &lt;&lt; Comment out this line<br>&nbsp; &lt;/Directory&gt;  
 
#cd C:\xampp\bugzilla-4.0.10  
 
#cd C:\xampp\bugzilla-4.0.10  
Line 65: Line 67:
  
 
#Login as Windows Administrator account.<br>  
 
#Login as Windows Administrator account.<br>  
 +
#set PATH=C:\xampp\apache\bin;C:\xampp\perl\bin;C:\strawberry\c\bin;%PATH%&nbsp;&nbsp;&nbsp; (if not being set before. )<br>
 
#cd C:\xampp\mysql\bin  
 
#cd C:\xampp\mysql\bin  
 
#Edit my.ini  
 
#Edit my.ini  

Revision as of 01:08, 21 May 2013

* DRAFT IN PROGRESS *

This page has the reference instruction to install Bugzilla for Tracked Resource Set(TRS) Workshop

Installing Bugzilla on Windows

The instruction of Bugzilla installation is available at Bugzilla documentation here. This wiki page is a digest of the installation instruction, so if you will find the problems about the installation, please refer to the Bugzilla documentation.

Since TRS adapter for Bugzilla calls Bugzilla api many times, "mod_perl" module, which is the embedded Perl interpreter in Apache web server,  needs to be installed for the good performance. If you will follow the instruction below, this module is automatically installed.

Prerequisites

The following specific version of software images need to be downloaded.

Installation

All installation needs to be done by Windows Administrator account.

  1. Download XAMPP v1.7.7
    1. Install all components in it to C:\xampp folder.
      Note: This version of XAMPP is the most latest driver that has "mod_perl" module.
  2. Download bugzilla v4.0.10
    1. Un-gzip and un-tar it under c:\xampp\ (so that bugzilla will be extracted at C:\xampp\bugzilla-4.0.10)
  3. Download strawberry-perl v5.16.3.1
    1. Install it to C:\strawberry. This strawberry perl is needed for 'cpan' to work. 'cpan' is a tool to install Perl modules.
      Note: strawberry perl componnets are used for the perl modues to be built. The runtime for Perl is xampp's perl.)
  4. Download cygwin.
    1. Install it to c:\cygwin. For the detailed instruction of the Cygwin instllation, please refer to Cygwin web page
    2. In addition to the default base packages from the Cygwin distribution, Devel's gcc, gcc-g++, gcc4, gcc4-g++ and their prerequisite packages need to be installed. They are necessary to build perl modules. ( Suggestion: If cygwin is installed already, please delete them, and install cygwin with gcc, gcc-g++, gcc4, gcc4-g++ and their prerequisite packages as well as what you need again. )
      Cygwin.png

Initial setup for XAMPP

  1. Login as Windows Administrator account.
  2. set PATH=C:\xampp\apache\bin;C:\xampp\perl\bin;C:\strawberry\c\bin;%PATH%
  3. cd C:\xampp
  4. setup_xampp.bat. If you will see "Sorry, but ... nothing do do !" message, you can ignore that message now.
  5. xampp-control.exe

Install necessary Perl modules for Bugzilla

  1. Login as Windows Administrator account.
  2. set PATH=C:\xampp\apache\bin;C:\xampp\perl\bin;C:\strawberry\c\bin;%PATH%     (if not being set before. )
  3. Check the necessary modules are installed
       cd C:\xampp\bugzilla-4.0.10
       c:\xampp\perl\bin\perl.exe checksetup.pl --check-module
  4. Make sure you will see the following messages as the missing modules.
    COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands and then re-run this script):

    c:\xampp\perl\bin\perl.exe install-module.pl CGI
    c:\xampp\perl\bin\perl.exe install-module.pl DateTime
    c:\xampp\perl\bin\perl.exe install-module.pl DateTime::TimeZone
    c:\xampp\perl\bin\perl.exe install-module.pl Template
    c:\xampp\perl\bin\perl.exe install-module.pl Email::MIME
    c:\xampp\perl\bin\perl.exe install-module.pl List::MoreUtils

    To attempt an automatic install of every required and optional module with one command, do:
    c:\xampp\perl\bin\perl.exe install-module.pl --all

    *** Installation aborted. Read the messages above. ***


    Also make sure that installed SOAP::Lite is old and Test::Taint is missing. For example,

    Checking for SOAP-Lite (v0.712) found v0.710.10
    [...]
    Checking for Test-Taint (any) not found

  5. Work around for Template-Toolkit and Test::Tain installation issue
       cd C:\xampp\bugzilla-4.0.10
       c:\xampp\perl\bin\ppm.bat install Template-Toolkit
       c:\xampp\perl\bin\ppm.bat install Test::Taint
  6. Install prerequisite perl modules. Create a bat file which has the following commands, and save it and execute it. It takes a long time.
       cd C:\xampp\bugzilla-4.0.10
       c:\xampp\perl\bin\perl.exe install-module.pl CGI
       c:\xampp\perl\bin\perl.exe install-module.pl DateTime
       c:\xampp\perl\bin\perl.exe install-module.pl DateTime::TimeZone
       c:\xampp\perl\bin\perl.exe install-module.pl Email::MIME
       c:\xampp\perl\bin\perl.exe install-module.pl List::MoreUtils
       c:\xampp\perl\bin\perl.exe install-module.pl SOAP::Lite
  7. Work around for TimeZone linkage error
    1. cd C:\xampp\bugzilla-4.0.10\lib\DateTime\TimeZone
    2. Edit Local.pm to change "TimeZone" subroutine to return the fixed time zone name. The time zone name, in the following case, 'Asia/Tokyo', is in the list of Win32.pm in C:\xampp\bugzilla-4.0.10\lib\DateTime\TimeZone\Local so you can pick the correct one from them.  For example, the time zone names for US will be either

          'Eastern Standard Time' => 'America/New_York'
          'Central Standard Time' => 'America/Chicago'
          'Mountain Standard Time' => 'America/Denver'
          'Pacific Standard Time' => 'America/Los_Angeles'

      The code change for, for example, Japan,  is the following.

      sub TimeZone {
           return DateTime::TimeZone->new(name => 'Asia/Tokyo');     << Change the code to return the fixed time zone name
      #   my $class = shift; 
      << Comment out this line
      #   my $subclass = $class->_load_subclass(); 
      << Comment out this line
      #   for my $meth ( $subclass->Methods() ) { 
      << Comment out this line
      #         my $tz = $subclass->$meth(); 
      << Comment out this line
      #        return $tz if $tz; 
      << Comment out this line
      #   }  
      << Comment out this line
      #   die "Cannot determine local time zone\n"; 
      << Comment out this line
      }


      So you can change the time zone name accordingly. (For the bug information, please see "Cannot determine local time zone" error )

      Note1: This time zone name will be used in Bugzilla preferences. See Initial Bugzilla setup for the TRS Workshop below.
      Note2: Local.pm might be read-only, so you need to change its attribute before editing it.


Configure Apache

  1. Login as Windows Administrator account.
  2. set PATH=C:\xampp\apache\bin;C:\xampp\perl\bin;C:\strawberry\c\bin;%PATH%     (if not being set before. )
  3. cd C:\xampp\apache\conf
  4. Edit httpd.conf to add the following three lines after the line of "Include "conf/extra/httpd-perl.conf"
      # Perl settings
      Include "conf/extra/httpd-perl.conf"
     Alias /bugzilla "C:\xampp\bugzilla-4.0.10"   << Add this line
      PerlSwitches -IC:\xampp\bugzilla-4.0.10 -w -T     << Add this line
      PerlConfigRequire "C:\xampp\bugzilla-4.0.10\mod_perl.pl" << Add this line
  5. Continued : comment out the following two lines.
    # First, we configure the "default" to be a very restrictive set of
    # features.
    #
      <Directory />
         Options FollowSymLinks
    #   AllowOverride None << Comment out this line
         Order deny,allow
    #   Deny from all   << Comment out this line
      </Directory>
  6. cd C:\xampp\bugzilla-4.0.10
  7. Edit mod_perl.pl, comment out the following three lines.
    #use Apache2::SizeLimit;    << Comment out this line
    # This means that every httpd child will die after processing
    # a CGI if it is taking up more than 70MB of RAM all by itself.
    #Apache2::SizeLimit->set_max_unshared_size(70_000);  << Comment out this line
    ...
    PerlResponseHandler Bugzilla::ModPerl::ResponseHandler
    # PerlCleanupHandler Apache2::SizeLimit Bugzilla::ModPerl::CleanupHandler   << Comment out this line
    PerlOptions +ParseHeaders
    ...

Configure MySQL

  1. Login as Windows Administrator account.
  2. set PATH=C:\xampp\apache\bin;C:\xampp\perl\bin;C:\strawberry\c\bin;%PATH%    (if not being set before. )
  3. cd C:\xampp\mysql\bin
  4. Edit my.ini
  5. Add/modify the following lines in [mysqld] section.
    key_buffer = 16M
    max_allowed_packet = 4M     <<- modify this line
    table_cache = 64
    ...
    #bind-address="127.0.0.1"
    ft_min_word_len=2     <<- add this line
  6. cd C:\xampp\bugzilla-4.0.10
  7. Start MySQL by xampp-control.exe
  8. c:\xampp\perl\bin\perl.exe checksetup.pl
  9. Edit localconfig
       # Who we connect to the database as.
       $db_user='root' <<-- change this to the user name to be used. 'root' is recommended.
  10. c:\xampp\perl\bin\perl.exe checksetup.pl
  11. Input required values ( for example, hostname, )
    DO NOT FORGET BUGZILLA ADMIN USER/PASSWD ! ( admin=root@localhost.here, passwd=passw0rd )

Start Bugzilla

In order to start Bugzilla, please :

  1. Login as Windows Administrator account.
  2. Start MySQL by xampp-control.exe
  3. Start Apache by xampp-control.exe

As a reference, in order to stop Bugzilla, please

  1. Login as Windows Administrator account.
  2. Stop Apache by xampp-control.exe
  3. Stop MySQL by xampp-control.exe

Initial Bugzilla setup for the TRS Workshop

  1. Login bugzilla (http://<full qualified your host name >/bugzilla) with admin user/pasword( admin=root@localhost.here, passwd=passw0rd )
  2. Administration -> Parameters -> Email -> mail_delivery_method : None (or Test), then "Save Changes"
  3. Administration -> Parameters -> Required Settings -> urlbase : Type Bugzilla uri (for example, http://<full qualified your host name >/bugzilla), then "Save Changes"
  4. Administration -> Default Preferences -> Timezone used to display dates and times -> Set the time zone name which is used as the workaround for the perl installation. ( For example, Asia/Tokyo ) then "Submit Changes"
  5. Restart Bugzilla by xampp-control.exe (Restarting Apache is fine. )
  6. Login bugzilla with admin user/pasword
  7. Add users. For example,
    1. Administration -> Users -> add a new user, user=bugs@localhost.here, passwd=bugs4me. Add "editbugs" group access for "User is a member of these groups", then "Save Changes"
  8. Add products. For example,
    1. Administration -> Products -> Add a product -> Add 'Integration Product' product
    2. Edit components -> Add a new component ... -> Add 'Client', 'Install', 'Server' components with bugs@localhost.here as a default assignee.
  9. Add Bugs. For example,
    1. Log out and Log in with bugs@localhost.here/bugs4me
    2. Create several bugs in 'Integration Product' product/'Server' components.

Back to the top