Bugzilla adalah sistem pelacakan bug sumber terbuka terbaik. Sangat mudah digunakan dengan banyak fitur. Bugzilla memungkinkan Anda melacak bug dan berkolaborasi dengan pengembang dan tim lain di organisasi Anda secara efektif.
Ini adalah panduan penginstalan bugzilla langkah demi langkah yang terperinci untuk Linux.
1. Verifikasi Versi Perl
Pastikan versi perl Anda>=5.8.1 seperti yang ditunjukkan di bawah ini.
# perl -v This is perl, v5.8.8 built for i386-linux-thread-multi
Sebagian besar distribusi Linux dilengkapi dengan Perl. Jika Anda tidak memilikinya, unduh dan instal dari situs web distribusi yang sesuai.
2. Instal Basis Data MySQL
Pastikan versi MySQL Anda>=4.1.2 seperti gambar di bawah ini.
# mysql -V mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using readline 5.1
Jika Anda tidak memiliki mysql, instal menggunakan yum groupinstall, atau berdasarkan artikel instalasi LAMP, atau berdasarkan artikel rpm mysql.
3. Instal Apache
Jika Anda sudah menginstal apache, pastikan Anda dapat mengaksesnya dengan menggunakan http://{your-ip-address}.
Jika Anda tidak memiliki apache, instal menggunakan yum berdasarkan artikel instal LAMP, atau instal apache dari sumber.
4. Unduh bola tar Bugzilla terbaru
Unduh rilis stabil terbaru dari halaman unduhan bugzilla. Ekstrak file bugzilla*.tar.gz ke direktori root dokumen apache seperti gambar di bawah ini.
# cd ~ # wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-3.6.tar.gz # cd /var/www/html # tar xvfz /usr/save/bugzilla-3.4.6.tar.gz
5. Jalankan bugzilla checksetup.pl
Program bugzilla checksetup.pl akan memverifikasi apakah semua modul perl yang diperlukan telah diinstal. Ini juga akan menampilkan daftar semua modul bugzilla yang hilang yang perlu diinstal.
Anda dapat menjalankan program checksetup.pl sebanyak yang Anda suka sampai Anda memverifikasi bahwa semua modul perl yang diperlukan telah diinstal.
Berikut adalah output dari checksetup.pl yang dijalankan pertama, di mana telah terdaftar semua modul opsional dan wajib yang hilang.
# cd /var/www/html/bugzilla-3.4.6 # ./checksetup.pl --check-modules COMMANDS TO INSTALL OPTIONAL MODULES: GD: /usr/bin/perl install-module.pl GD Chart: /usr/bin/perl install-module.pl Chart::Base Template-GD: /usr/bin/perl install-module.pl Template::Plugin::GD::Image GDTextUtil: /usr/bin/perl install-module.pl GD::Text GDGraph: /usr/bin/perl install-module.pl GD::Graph XML-Twig: /usr/bin/perl install-module.pl XML::Twig MIME-tools: /usr/bin/perl install-module.pl MIME::Parser libwww-perl: /usr/bin/perl install-module.pl LWP::UserAgent PatchReader: /usr/bin/perl install-module.pl PatchReader PerlMagick: /usr/bin/perl install-module.pl Image::Magick perl-ldap: /usr/bin/perl install-module.pl Net::LDAP Authen-SASL: /usr/bin/perl install-module.pl Authen::SASL RadiusPerl: /usr/bin/perl install-module.pl Authen::Radius SOAP-Lite: /usr/bin/perl install-module.pl SOAP::Lite HTML-Parser: /usr/bin/perl install-module.pl HTML::Parser HTML-Scrubber: /usr/bin/perl install-module.pl HTML::Scrubber Email-MIME-Attachment-Stripper: /usr/bin/perl install-module.pl Email::MIME::Attachment::Stripper Email-Reply: /usr/bin/perl install-module.pl Email::Reply TheSchwartz: /usr/bin/perl install-module.pl TheSchwartz Daemon-Generic: /usr/bin/perl install-module.pl Daemon::Generic mod_perl: /usr/bin/perl install-module.pl mod_perl2 YOU MUST RUN ONE OF THE FOLLOWING COMMANDS (depending on which database you use): PostgreSQL: /usr/bin/perl install-module.pl DBD::Pg MySQL: /usr/bin/perl install-module.pl DBD::mysql Oracle: /usr/bin/perl install-module.pl DBD::Oracle COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands and then re-run checksetup.pl): /usr/bin/perl install-module.pl CGI /usr/bin/perl install-module.pl Digest::SHA /usr/bin/perl install-module.pl Date::Format /usr/bin/perl install-module.pl DateTime /usr/bin/perl install-module.pl DateTime::TimeZone /usr/bin/perl install-module.pl Template /usr/bin/perl install-module.pl Email::Send /usr/bin/perl install-module.pl Email::MIME /usr/bin/perl install-module.pl Email::MIME::Encodings /usr/bin/perl install-module.pl Email::MIME::Modifier /usr/bin/perl install-module.pl URI To attempt an automatic install of every required and optional module with one command, do: /usr/bin/perl install-module.pl --all
6. Jalankan bugzilla install-module.pl
Seperti yang disarankan oleh output checksetup.pl, Anda dapat menjalankan install-module.pl untuk menginstal semua bugzilla yang diperlukan dan modul perl opsional.
# /usr/bin/perl install-module.pl --all
Harap tinjau output dari install-module.pl di atas untuk memastikan semuanya terinstal dengan benar. Ada kemungkinan beberapa modul gagal diinstal (mungkin karena beberapa paket OS yang diperlukan tidak ada).
Jalankan checksetup.pl untuk memverifikasi apakah semua modul telah terinstal dengan benar.
Berikut adalah output dari run kedua checksetup.pl:
# ./checksetup.pl --check-modules COMMANDS TO INSTALL OPTIONAL MODULES: GD: /usr/bin/perl install-module.pl GD Chart: /usr/bin/perl install-module.pl Chart::Base Template-GD: /usr/bin/perl install-module.pl Template::Plugin::GD::Image GDTextUtil: /usr/bin/perl install-module.pl GD::Text GDGraph: /usr/bin/perl install-module.pl GD::Graph XML-Twig: /usr/bin/perl install-module.pl XML::Twig PerlMagick: /usr/bin/perl install-module.pl Image::Magick SOAP-Lite: /usr/bin/perl install-module.pl SOAP::Lite mod_perl: /usr/bin/perl install-module.pl mod_perl2 YOU MUST RUN ONE OF THE FOLLOWING COMMANDS (depending on which database you use): PostgreSQL: /usr/bin/perl install-module.pl DBD::Pg MySQL: /usr/bin/perl install-module.pl DBD::mysql Oracle: /usr/bin/perl install-module.pl DBD::Oracle
7. Instal Modul Perl yang hilang
Seperti yang kita lihat dari output checksetup.pl di atas, beberapa modul opsional dan modul yang diperlukan yang diinstal tidak selesai ketika kita menjalankan install-module.pl.
Jadi, kita harus menginstal modul yang hilang secara manual satu per satu untuk mencari tahu masalahnya dan memperbaikinya satu per satu.
Lihat “Bagian Pemecahan Masalah” di bagian akhir untuk daftar semua masalah yang saya hadapi saat menginstal modul perl yang diperlukan untuk bugzilla (bersama dengan solusi tentang cara memperbaiki masalah tersebut).
8. checksetup.pl akhir – verifikasi modul-periksa
Jalankan checksetup.pl –check-modules lagi seperti yang ditunjukkan di bawah ini sebagai verifikasi akhir untuk memastikan semua modul berhasil diinstal.
# ./checksetup.pl --check-modules * This is Bugzilla 3.4.6 on perl 5.8.8 * Running on Linux 2.6.18-164.el5PAE #1 SMP Thu Sep 3 04:10:44 EDT 2009 Checking perl modules... Checking for CGI.pm (v3.21) ok: found v3.49 Checking for Digest-SHA (any) ok: found v5.48 Checking for TimeDate (v2.21) ok: found v2.24 Checking for DateTime (v0.28) ok: found v0.55 Checking for DateTime-TimeZone (v0.71) ok: found v1.17 Checking for DBI (v1.41) ok: found v1.52 Checking for Template-Toolkit (v2.22) ok: found v2.22 Checking for Email-Send (v2.00) ok: found v2.198 Checking for Email-MIME (v1.861) ok: found v1.903 Checking for Email-MIME-Encodings (v1.313) ok: found v1.313 Checking for Email-MIME-Modifier (v1.442) ok: found v1.903 Checking for URI (any) ok: found v1.54 Checking available perl DBD modules... Checking for DBD-Pg (v1.45) not found Checking for DBD-mysql (v4.00) ok: found v4.013 Checking for DBD-Oracle (v1.19) not found The following Perl modules are optional: Checking for GD (v1.20) ok: found v2.44 Checking for Chart (v1.0) ok: found v2.4.1 Checking for Template-GD (any) ok: found v1.56 Checking for GDTextUtil (any) ok: found v0.86 Checking for GDGraph (any) ok: found v1.44 Checking for XML-Twig (any) ok: found v3.34 Checking for MIME-tools (v5.406) ok: found v5.427 Checking for libwww-perl (any) ok: found v5.834 Checking for PatchReader (v0.9.4) ok: found v0.9.5 Checking for PerlMagick (any) ok: found v6.2.8 Checking for perl-ldap (any) ok: found v0.4001 Checking for Authen-SASL (any) ok: found v2.1401 Checking for RadiusPerl (any) ok: found v0.17 Checking for SOAP-Lite (v0.710.06) ok: found v0.711 Checking for HTML-Parser (v3.40) ok: found v3.65 Checking for HTML-Scrubber (any) ok: found v0.08 Checking for Email-MIME-Attachment-Stripper (any) ok: found v1.316 Checking for Email-Reply (any) ok: found v1.202 Checking for TheSchwartz (any) ok: found v1.10 Checking for Daemon-Generic (any) ok: found v0.61 Checking for mod_perl (v1.999022) ok: found v2.000004
9. Buat file konfigurasi lokal menggunakan checksetup.pl
Jalankan checksetup.pl tanpa argumen apa pun, yang akan membuat file konfigurasi lokal di direktori saat ini. File localconfig berisi parameter konfigurasi kunci yang digunakan oleh bugzilla (misalnya, nama pengguna dan kata sandi mysql db).
# ./checksetup.pl Reading ./localconfig... 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: create_htaccess, webservergroup, db_driver, db_host, db_name, db_user, db_pass, db_port, db_sock, db_check, index_html, cvsbin, interdiffbin, diffpath, site_wide_secret
10. Ubah file konfigurasi lokal.
Satu-satunya hal yang Anda perlukan untuk memodifikasi file localconfig adalah kata sandi db database MySQL dengan mengubah variabel $db_pass seperti yang ditunjukkan di bawah ini.
# vi ./localconfig $db_pass = 'Bugs4All';
11. Ubah /etc/my.cnf untuk meningkatkan ukuran lampiran bugzilla
Setel max_allowed_packet ke 4M di /etc/my.cnf untuk meningkatkan ukuran lampiran bugzilla.
# cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Default to using old password format for compatibility with mysql 3.x # clients (those using the mysqlclient10 compatibility package). old_passwords=1 # Disabling symbolic-links is recommended to prevent assorted security risks; # to do so, uncomment this line: # symbolic-links=0 # Allow packets up to 4MB max_allowed_packet=4M [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
Mulai ulang mysqld setelah perubahan ini.
# service mysqld restart
12. Buat bug pengguna mysql
Tambahkan pengguna bugzilla (bug) ke database mysql seperti yang ditunjukkan di bawah ini.
# mysql -u root -p mysql> GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY 'Bugs4All'; mysql> FLUSH PRIVILEGES;
13. Buat database bugzilla
Jalankan checksetup.pl (tanpa argumen) lagi untuk membuat database bugzilla mysql. Karena file localconfig sudah ada, kedua kali ketika Anda menjalankan checksetup.pl, itu akan membuat database mysql berdasarkan informasi dari file localconfig.
# ./checksetup.pl Creating database bugs... Building Schema object from database... Adding new table bz_schema ... Initializing the new Schema storage... Adding new table attach_data ... Adding new table attachments ... Adding new table bug_group_map ... Adding new table bug_see_also ... Adding new table bug_severity ... Adding new table bug_status ... Inserting values into the 'priority' table: Inserting values into the 'bug_status' table: Inserting values into the 'rep_platform' table: Creating ./data directory... Creating ./data/attachments directory... Creating ./data/duplicates directory... Adding foreign key: attachments.bug_id -> bugs.bug_id... Adding foreign key: attachments.submitter_id -> profiles.userid... Adding foreign key: bug_group_map.bug_id -> bugs.bug_id...
14. Buat akun administrator bugzilla.
Pada akhir eksekusi ./checksetup.pl, ia akan mendeteksi bahwa Anda tidak memiliki akun administrator dan meminta Anda untuk memasukkan informasi login administrasi seperti yang ditunjukkan di bawah ini.
Looks like we don't have an administrator set up yet. Either this is your first time using Bugzilla, or your administrator's privileges might have accidentally been deleted. Enter the e-mail address of the administrator: [email protected] Enter the real name of the administrator: Ramesh Natarajan Enter a password for the administrator account: NotRealPwd Please retype the password to verify: welcome [email protected] is now set up as an administrator. Creating default classification 'Unclassified'... Creating initial dummy product 'TestProduct'... Now that you have installed Bugzilla, you should visit the 'Parameters' page (linked in the footer of the Administrator account) to ensure it is set up as you wish - this includes setting the 'urlbase' option to the correct URL.
15. Konfigurasi apache untuk mod_perl
Ganti nama direktori bugzilla. (yaitu menghapus nomor versi di dalamnya)
# cd /var/www/html # mv bugzilla-3.4.6/ bugzilla
Tambahkan dua baris berikut ke httpd.conf
# tail -2 /etc/httpd/conf/httpd.conf PerlSwitches -I/var/www/html/bugzilla -I/var/www/html/bugzilla/lib -w -T PerlConfigRequire /var/www/html/bugzilla/mod_perl.pl
Verifikasi bahwa Grup di httpd.conf cocok dengan grup server web di konfigurasi lokal
# cd /var/www/html/bugzilla/ # grep webservergroup localconfig $webservergroup = 'apache'; # grep Group /etc/httpd/conf/httpd.conf Group apache
16. Eksekusi checksetup.pl akhir
Jalankan checksetup.pl lagi.
# ./checksetup.pl Reading ./localconfig... Removing existing compiled templates... Precompiling templates...done. Fixing file permissions... Now that you have installed Bugzilla, you should visit the 'Parameters' page (linked in the footer of the Administrator account) to ensure it is set up as you wish - this includes setting the 'urlbase' option to the correct URL.
17. Masuk ke bugzilla dan selesaikan pengaturan satu kali.
Jalankan apache, buka http://{your-ip-address}/bugzilla dan login menggunakan akun administrator yang Anda buat di atas.
Dari UI bugzilla, di footer -> Administration -> Parameters -> ' Bagian Pengaturan yang Diperlukan -> Isi informasi berikut:
pengelola:[email protected]
urlbase:http://{your-ip-address}/
Catatan:Tergantung pada pengaturan Anda, buka -> Otentikasi Pengguna -> dan Anda mungkin ingin mengubah parameter yang diperlukanlogin dan emailregexp.
Memecahkan Masalah Pemasangan Bugzilla
Masalah1:DBD::modul mysql gagal
Modul DBD:mysql perl gagal dengan pesan kesalahan “mysql.h:No such file or directory” seperti yang ditunjukkan di bawah ini.
# /usr/bin/perl install-module.pl DBD::mysql dbdimp.h:22:49: error: mysql.h: No such file or directory dbdimp.h:23:45: error: mysqld_error.h: No such file or directory dbdimp.h:25:49: error: errmsg.h: No such file or directory In file included from dbdimp.c:20: dbdimp.h:144: error: expected specifier-qualifier-list before âMYSQLâ dbdimp.h:236: error: expected specifier-qualifier-list before âMYSQL_RESâ
Solusi1:instal mysql-devel
Pesan error “mysql.h:No such file or directory” karena paket mysql-devel hilang seperti gambar di bawah ini.
# rpm -qa | grep -i mysql MySQL-python-1.2.1-1 mysql-5.0.77-4.el5_4.2 mysql-connector-odbc-3.51.26r1127-1.el5 mysql-server-5.0.77-4.el5_4.2 libdbi-dbd-mysql-0.8.1a-1.2.2 perl-DBD-MySQL-3.0007-2.el5
Instal paket mysql-devel seperti yang ditunjukkan di bawah ini.
# yum install mysql-devel # rpm -qa | grep -i "mysql-devel" mysql-devel-5.0.77-4.el5_4.2
Instalasi DBD::mysql akan berjalan tanpa masalah sekarang.
# /usr/bin/perl install-module.pl DBD::mysql
Masalah2:GD gagal dengan gdlib-config / libgd yang hilang
Instalasi modul GD gagal dengan pesan kesalahan berikut.
# /usr/bin/perl install-module.pl GD **UNRECOVERABLE ERROR** Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher. If you want to try to compile anyway, please rerun this script with the option --ignore_missing_gd. Running make test Make had some problems, maybe interrupted? Won't test Running make install Make had some problems, maybe interrupted? Won't install
Solusi2:Instal paket gd-devel
Instal libgd (yaitu paket gd-devel) seperti yang ditunjukkan di bawah ini untuk memperbaiki masalah modul GD.
# yum install gd-devel # rpm -qa | grep gd gd-2.0.33-9.4.el5_4.2 gd-devel-2.0.33-9.4.el5_4.2
GD terinstal tanpa masalah apa pun setelah menginstal paket gd-devel.
# /usr/bin/perl install-module.pl GD
Masalah3:Ranting Gagal dengan kesalahan expat.h
Modul Twig gagal dipasang dengan pesan kesalahan “expat.h:No such file or directory” seperti yang ditunjukkan di bawah ini.
# /usr/bin/perl install-module.pl XML::Twig Expat.xs:12:19: error: expat.h: No such file or directory Expat.xs:60: error: expected specifier-qualifier-list before XML_Parser
Solusi3:Instal expat dan expat-devel untuk Twig
Instal paket expat dan expat-devel seperti yang ditunjukkan di bawah ini.
# yum install expat # yum install expat-devel
Sekarang instal Twig tanpa masalah.
# /usr/bin/perl install-module.pl XML::Twig
Masalah4:Gambar::Magick gagal dipasang
Gambar::Magick instalasi gagal dengan pesan kesalahan “magick/MagickCore.h:No such file or directory” seperti yang ditunjukkan di bawah ini.
# /usr/bin/perl install-module.pl Image::Magick Note (probably harmless): No library found for -lMagickCore Magick.xs:64:31: error: magick/MagickCore.h: No such file or directory Magick.xs:171: error: expected specifier-qualifier-list before ‘MagickRealType’ Magick.xs:192: error: expected specifier-qualifier-list before ‘ImageInfo’ Magick.xs:214: error: ‘MagickNoiseOptions’ undeclared here (not in a function) Magick.xs:214: warning: missing initializer
Solusi4:Gambar::Magick gagal dipasang
Pastikan paket terkait ImageMagic berikut ada.
# rpm -qa | grep -i Image ImageMagick-6.2.8.0-4.el5_1.1 ImageMagick-c++-devel-6.2.8.0-4.el5_1.1 ImageMagick-devel-6.2.8.0-4.el5_1.1 ImageMagick-c++-6.2.8.0-4.el5_1.1 ImageMagick-perl-6.2.8.0-4.el5_1.1
Dalam kasus saya, ImageMagic-devel hilang. Jadi, instal seperti yang ditunjukkan di bawah ini. Setelah itu, modul Image::Magick perl berhasil diinstal.
# yum install ImageMagick-devel # /usr/bin/perl install-module.pl Image::Magick
Masalah5:SOAP::Lite gagal dipasang
SOAP::Lite module gagal dipasang dengan pesan “Cannot locate version.pm in @INC” seperti yang ditunjukkan di bawah ini.
#/usr/bin/perl install-module.pl SOAP::Lite Failed test 'use SOAP::Lite;' at t/SOAP/Data.t line 5. Tried to use 'SOAP::Lite'. Error: Can't locate version.pm in @INC
Solusi5:Instal version.pm diperlukan untuk SOAP::Lite
Versi terinstal.pm seperti yang ditunjukkan di bawah ini. Setelah ini, SOAP::Lite terinstal tanpa masalah.
# perl -MCPAN -e 'install version' # /usr/bin/perl install-module.pl SOAP::Lite
Masalah6 (dan Solusi6):mod_perl tidak ada
Jangan menginstal mod_perl menggunakan /usr/bin/perl install-module.pl mod_perl2 . Insetad, gunakan yum untuk menginstal mod_perl seperti yang ditunjukkan di bawah ini.
# yum install mod_perl
Masalah7:Apache mulai gagal
Memulai Apache gagal dengan pesan kesalahan "Tidak dapat menemukan Template/Config.pm di @INC".
# service httpd restart Stopping httpd: [ OK ] Starting httpd: Syntax error on line 994 of /etc/httpd/conf/httpd.conf: Can't locate Template/Config.pm in @INC
Solusi7:Instal Template-Tool Kit seperti yang ditunjukkan di bawah ini
Instal Kit Template-Tool untuk memperbaiki pesan kesalahan apache di atas
# cpan cpan> i /Template-Toolkit/ Distribution A/AB/ABEL/Eidolon-Driver-Template-Toolkit-0.01.tar.gz Distribution A/AB/ABW/Template-Toolkit-1.07.tar.gz Distribution A/AB/ABW/Template-Toolkit-2.22.tar.gz Distribution I/IN/INGY/Template-Toolkit-Simple-0.03.tar.gz 4 items found cpan> install A/AB/ABW/Template-Toolkit-2.22.tar.gz
Masalah8:Apache mulai gagal lagi
Memulai apache gagal dengan pesan kesalahan "Tidak dapat menemukan DateTime/Locale.pm di @INC".
# service httpd restart Stopping httpd: [ OK ] Starting httpd: Syntax error on line 994 of /etc/httpd/conf/httpd.conf: Can't locate DateTime/Locale.pm in @INC
Solusi8:Instal DateTime/Locale.pm seperti yang ditunjukkan di bawah ini
Instal DateTime/Locale.pm untuk memperbaiki pesan kesalahan apache di atas
# cpan cpan> install DateTime:Locale
Juga, di apache error_log Anda jika Anda melihat masalah Digest/SHA.pm, Anda harus menginstalnya seperti yang ditunjukkan di bawah ini.
# tail -f /etc/httpd/logs/error_log Can't locate Digest/SHA.pm in @INC (@INC contains: # cpan cpan> install Digest::SHA