Bugzilla

Cài đặt bugzilla trên mac os

B1: Cài đặt perl

  • Sử dụng ActivePerl
  • Hoặc sử dụng Perlbrew => Sau khi cài đặt phải tạo biến (symbolic link) của perl tới thư mục mặc định
1
sudo ln -s /usr/local/ActivePerl-5.8/bin/perl /usr/bin/perl

hoặc

1
sudo ln -s /Users/trphloc/perl5/perlbrew/perls/perl-5.20.1/bin/perl /usr/bin/perl

B2: Cài đặt make

  • Thực hiện các lệnh sau (các lệnh sau, phải thực hiện trong cpan
1
2
3
4
cpan
o conf make '/usr/bin/make'
o conf commit
exit
  • Tham khảo: http://askubuntu.com/questions/161060/how-do-i-install-make

B3: Một số gói cần cài đặt (tùy chọn)

1
brew install libgd
1
2
cpan install patchutils
cpan upgrade DBI

B4: Cài đặt Driver cho cơ sở dữ liệu

  • Postgres
1
sudo perl -MCPAN -e "install DBD::Pg"
  • mysql
1
sudo -H cpan DBD::mysql

B5: Cài đặt bugzilla

  • Lấy mã nguồn theo đường dẫn: “sudo git clone –branch bugzilla-4.4-stable https://git.mozilla.org/bugzilla/bugzilla”
  • Di chuyển vào thư mục bugzilla
  • Thực thi lệnh
1
sudo perl ./checksetup.pl
  • Nếu có lỗi (báo thiếu module) thì cài thêm module theo hướng dẫn hoặc có thể thực hiện lệnh sau
1
sudo perl install-module.pl --all
  • Nếu ko có lỗi (hoặc đã cài bổ sung đủ module) thì thực thi lại lệnh checksetup, lệnh sẽ phát sinh thêm localconfig trong cùng thư mục
1
sudo perl ./checksetup.pl
  • Vào tập tin localconfig sửa các thông tin của database
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$db_host = 'localhost';
   
   # The name of the database. For Oracle, this is the database's SID. For
   # SQLite, this is a name (or path) for the DB file.
   $db_name = 'bugzilla';
   
   # Who we connect to the database as.
   $db_user = 'postgres';
   
   # 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 (\)
   # (It is far simpler to just not use those characters.)
   $db_pass = '';
   
   # Sometimes the database server is running on a non-standard port. If that's
   # the case for your database server, set this to the port number that your
   # database server is running on. Setting this to 0 means "use the default
   # port for my database server."
   $db_port = 5432;
  • Thực thi lại lệnh checksetup
1
sudo perl ./checksetup.pl
  • Thành công thì có thể truy cập vào theo đường dẫn