1+1=10

扬长避短 vs 取长补短

Install Bugzilla on Windows

According to the documentation of Bugzilla 5.0, the following applications should be installed first:

  • ActiveState Perl 5.18.2 (5.12.4 or higher)
  • Apache 2.4 (2.2.x or higher)
  • MySql 5.6 (5.0.15 or higher)

Download Bugzilla

git clone --branch 5.0 https://git.mozilla.org/bugzilla/bugzilla bugzilla

or (when 5.0 is released)

git clone --branch bugzilla-5.0-stable https://git.mozilla.org/bugzilla/bugzilla bugzilla

Install required perl modules

ppm install CGI.pm Digest-SHA TimeDate DateTime DateTime-TimeZone DBI Template-Toolkit Email-Sender Email-MIME URI List-MoreUtils Math-Random-ISAAC File-Slurp JSON-XS Win32 Win32-API DBD-mysql DateTime::TimeZone::Local::Win32

Note, Don't forget DateTime::TimeZone::Local::Win32, otherwise, following error will occur when we try to use bugzilla.

The following modules are needed if want to use bugzilla to sent mails through smtp.

ppm install Authen-SASL Net-SMTP-SSL

Cannot determine local time zone

MySQL Configuration

Add a user

Connect to mysqld

mysql -u root -p

Then add a new user call bugs

GRANT SELECT, INSERT,
UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES,
CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.*
TO bugs@localhost IDENTIFIED BY 'mypassword';

FLUSH PRIVILEGES;

Configuration File

On my system, the conf file is at C:\ProgramData\MySQL\MySQL Server 5.6\my.ini

Add following lines

[mysqld]
# Allow packets up to 16M
max_allowed_packet=16M
# Allow small words in full-text indexes
ft_min_word_len=2

Apache Configuration

  • Enable CGI Support by uncommenting following line
    AddHandler cgi-script .cgi
  • Config Bugzilla
    Alias "/bugzilla" "d:/www/Bugzilla"
    <Directory "d:/www/Bugzilla">
        ScriptInterpreterSource Registry-Strict
        Options +ExecCGI +FollowSymLinks
        DirectoryIndex index.cgi index.html
        AllowOverride Limit FileInfo Indexes Options
        Require all granted
    </Directory>

Note:

In order for ScriptInterpreterSource Registry-Strict to work, create a key HKEY_CLASSES_ROOT.cgi\Shell\ExecCGI\Command with the default value of the full path of perl.exe with a -T parameter. For example C:\Perl64\bin\perl.exe -T.

checksetup.pl

  • Run checksetup.pl to generate localconfig file.

Edit the localconfig file, in our case, only $db_pass is needed.

  • Run checksetup.pl again

Database tables will be created.

Administrator account (user name and password) will be created at the same time.

OK

http://127.0.0.1/bugzilla should works now.

Links

  • http://bugzilla.readthedocs.org/en/5.0/installing/windows.html
  • http://search.cpan.org/dist/DateTime-TimeZone/lib/DateTime/TimeZone.pm
  • http://www.cnblogs.com/mr-wid/archive/2013/05/09/3068229.html

tools

Comments