1、安装mysql-4.1.18-win32.zip,创建bugs数据库。
create database bugs;
GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE, LOCK TABLES,DROP,REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY 'bugs';
FLUSH PRIVILEGES;
2、安装ActivePerl-5.8.8.822-MSWin32-x86-280952.msi
3、解压bugzilla-2.20.6.tar.gz。
4、执行perl checkup.pl,检查必要的Perl包。这个阶段比较复杂,有时有些包比较难找,可以参考http://cpan.perl.org/。我在安装的时候用到了如下PPM资源:
http://ppm4.activestate.com/MSWin32-x86/5.8/822/package.xml(默认)
http://theoryx5.uwinnipeg.ca/ppms/
http://trouchelle.com/ppm/
也可参考http://win32.perl.org/wiki/index.php?title=PPM_Repositories列举的PPM资源。
5、修改localconfig
$db_host = 'localhost'; # where is the database?
$db_name = 'bugs'; # name of the SQL database
$db_user = 'bugs'; # user to attach to the SQL database
$db_pass = 'bugs';
6、重新执行perl checkup.pl,输入bugzilla管理员、密码和邮件服务器地址等。
7、配置bugzilla虚拟目录,cgi、pl两个应用程序扩展,都使用C:/Perl/bin/perl.exe "%s" %s可执行文件。并添加index.cgi默认文档。
8、启用Web 服务扩展 - Perl CGI Extension
9、修改所有cgi、pl文档中的-wT为-w。
10、邮件设置。
在Bugzilla/BugMail.pm文档中添加
use MIME::Base64;
修改MessageToMTA($msg); 为 MessageToMTA_NEW($msg, $user->email);
并添加函数
sub MessageToMTA_NEW ($;$)
{
my ($msg,$rcpt_to) = @_;
use Net::SMTP;
my $smtp_server = 'xxxx';
my $smtp_user = 'xxxxxxx';
my $smtp_pass = 'xxxxxxx;
my $encode_smtpuser = trim(encode_base64($smtp_user));
my $encode_smtppass = trim(encode_base64($smtp_pass));
my $smtp = Net::SMTP->new($smtp_server,Timeout => 60) ||
die 'Cannot connect to smtp server';
my $result = $smtp->command('AUTH','LOGIN');
my $answer = $smtp->getline();
# 334 VXNlcm5hbWU6
$result = $smtp->command($encode_smtpuser);
$answer = $smtp->getline();
# 334 UGFzc3dvcmQ6
$result = $smtp->command($encode_smtppass);
$answer = $smtp->getline();
# 235 Authentication successful
# or 535 Authentication failed
if ($answer =~ /535/i)
{print "Soryy,Authentication failed!n";exit;}
$smtp->mail($smtp_user);
$smtp->to($rcpt_to);
$smtp->data();
$smtp->datasend($msg);
$smtp->dataend();
$smtp->quit;
}
11、汉化。解压bugzilla-2.20-cn-1.0.zip中的cn_GB2312.zip到Template目录下cn。修改data/params中'languages' => 'cn',
12、结束。
create database bugs;
GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE, LOCK TABLES,DROP,REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY 'bugs';
FLUSH PRIVILEGES;
2、安装ActivePerl-5.8.8.822-MSWin32-x86-280952.msi
3、解压bugzilla-2.20.6.tar.gz。
4、执行perl checkup.pl,检查必要的Perl包。这个阶段比较复杂,有时有些包比较难找,可以参考http://cpan.perl.org/。我在安装的时候用到了如下PPM资源:
http://ppm4.activestate.com/MSWin32-x86/5.8/822/package.xml(默认)
http://theoryx5.uwinnipeg.ca/ppms/
http://trouchelle.com/ppm/
也可参考http://win32.perl.org/wiki/index.php?title=PPM_Repositories列举的PPM资源。
5、修改localconfig
$db_host = 'localhost'; # where is the database?
$db_name = 'bugs'; # name of the SQL database
$db_user = 'bugs'; # user to attach to the SQL database
$db_pass = 'bugs';
6、重新执行perl checkup.pl,输入bugzilla管理员、密码和邮件服务器地址等。
7、配置bugzilla虚拟目录,cgi、pl两个应用程序扩展,都使用C:/Perl/bin/perl.exe "%s" %s可执行文件。并添加index.cgi默认文档。
8、启用Web 服务扩展 - Perl CGI Extension
9、修改所有cgi、pl文档中的-wT为-w。
10、邮件设置。
在Bugzilla/BugMail.pm文档中添加
use MIME::Base64;
修改MessageToMTA($msg); 为 MessageToMTA_NEW($msg, $user->email);
并添加函数
sub MessageToMTA_NEW ($;$)
{
my ($msg,$rcpt_to) = @_;
use Net::SMTP;
my $smtp_server = 'xxxx';
my $smtp_user = 'xxxxxxx';
my $smtp_pass = 'xxxxxxx;
my $encode_smtpuser = trim(encode_base64($smtp_user));
my $encode_smtppass = trim(encode_base64($smtp_pass));
my $smtp = Net::SMTP->new($smtp_server,Timeout => 60) ||
die 'Cannot connect to smtp server';
my $result = $smtp->command('AUTH','LOGIN');
my $answer = $smtp->getline();
# 334 VXNlcm5hbWU6
$result = $smtp->command($encode_smtpuser);
$answer = $smtp->getline();
# 334 UGFzc3dvcmQ6
$result = $smtp->command($encode_smtppass);
$answer = $smtp->getline();
# 235 Authentication successful
# or 535 Authentication failed
if ($answer =~ /535/i)
{print "Soryy,Authentication failed!n";exit;}
$smtp->mail($smtp_user);
$smtp->to($rcpt_to);
$smtp->data();
$smtp->datasend($msg);
$smtp->dataend();
$smtp->quit;
}
11、汉化。解压bugzilla-2.20-cn-1.0.zip中的cn_GB2312.zip到Template目录下cn。修改data/params中'languages' => 'cn',
12、结束。