Bugzilla ist das beste Open-Source-Fehlerverfolgungssystem. Sehr einfach zu bedienen mit vielen Funktionen. Mit Bugzilla können Sie Fehler verfolgen und effektiv mit Entwicklern und anderen Teams in Ihrer Organisation zusammenarbeiten.
Dies ist eine detaillierte Schritt-für-Schritt-Bugzilla-Installationsanleitung für Linux.
1. Überprüfen Sie die Perl-Version
Stellen Sie sicher, dass Ihre Perl-Version>=5.8.1 ist, wie unten gezeigt.
# perl -v This is perl, v5.8.8 built for i386-linux-thread-multi
Die meisten Linux-Distributionen enthalten Perl. Wenn Sie es nicht auf Ihrem haben, laden Sie es von der entsprechenden Distributions-Website herunter und installieren Sie es.
2. MySQL-Datenbank installieren
Stellen Sie sicher, dass Ihre MySQL-Version>=4.1.2 ist, wie unten gezeigt.
# mysql -V mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using readline 5.1
Wenn Sie mysql nicht haben, installieren Sie es mit yum groupinstall oder basierend auf dem LAMP-Installationsartikel oder basierend auf dem mysql-RPM-Artikel.
3. Installieren Sie Apache
Wenn Sie Apache bereits installiert haben, stellen Sie sicher, dass Sie über http://{Ihre-IP-Adresse} darauf zugreifen können.
Wenn Sie keinen Apache haben, installieren Sie yum basierend auf dem LAMP-Installationsartikel oder installieren Sie Apache von der Quelle.
4. Laden Sie den neusten Bugzilla-Tar-Ball herunter
Laden Sie die neueste stabile Version von der Bugzilla-Downloadseite herunter. Extrahieren Sie die Datei bugzilla*.tar.gz wie unten gezeigt in das Stammverzeichnis des Apache-Dokuments.
# 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. Führen Sie die bugzilla checksetup.pl
ausDas Programm Bugzilla checksetup.pl überprüft, ob alle erforderlichen Perl-Module installiert sind. Dies zeigt auch eine Liste aller fehlenden Bugzilla-Module an, die installiert werden müssen.
Sie können das Programm checksetup.pl so oft ausführen, wie Sie möchten, bis Sie überprüft haben, dass alle erforderlichen Perl-Module installiert sind.
Es folgt die Ausgabe des ersten Durchlaufs von checksetup.pl, wo alle fehlenden optionalen und erforderlichen Module aufgeführt sind.
# 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. Führen Sie bugzilla install-module.pl
ausWie die Ausgabe von checksetup.pl nahelegt, können Sie install-module.pl ausführen, um alle für Bugzilla erforderlichen und optionalen Perl-Module zu installieren.
# /usr/bin/perl install-module.pl --all
Bitte überprüfen Sie die Ausgabe der obigen install-module.pl, um sicherzustellen, dass alles richtig installiert wurde. Es besteht die Möglichkeit, dass einige der Module nicht installiert werden konnten (möglicherweise weil einige erforderliche Betriebssystempakete fehlten).
Führen Sie checksetup.pl aus, um zu überprüfen, ob alle Module korrekt installiert wurden.
Es folgt die Ausgabe des zweiten Durchlaufs von 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. Fehlende Perl-Module installieren
Wie wir aus der obigen Ausgabe von checksetup.pl sehen können, wurden einige der installierten optionalen Module und erforderlichen Module nicht abgeschlossen, als wir install-module.pl ausführten.
Daher müssen wir die fehlenden Module einzeln manuell installieren, um die Probleme herauszufinden und sie einzeln zu beheben.
Im Abschnitt „Fehlerbehebung“ am Ende finden Sie eine Liste aller Probleme, mit denen ich bei der Installation der für Bugzilla erforderlichen Perl-Module konfrontiert war (zusammen mit der Lösung, wie diese Probleme behoben werden können).
8. Final checksetup.pl –check-modules verifizierung
Führen Sie checksetup.pl –check-modules erneut aus, wie unten gezeigt, als endgültige Überprüfung, um sicherzustellen, dass alle Module erfolgreich installiert wurden.
# ./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. Erstellen Sie die localconfig-Datei mit checksetup.pl
Führen Sie checksetup.pl ohne Argumente aus, wodurch eine localconfig-Datei im aktuellen Verzeichnis erstellt wird. Die localconfig-Datei enthält die wichtigsten Konfigurationsparameter, die von Bugzilla verwendet werden (z. B. mysql db-Benutzername und -Passwort).
# ./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. Ändern Sie die localconfig-Datei.
Das einzige, was Sie brauchen, um die localconfig-Datei zu ändern, ist das MySQL-Datenbank-DB-Passwort, indem Sie die $db_pass-Variable wie unten gezeigt ändern.
# vi ./localconfig $db_pass = 'Bugs4All';
11. Ändern Sie /etc/my.cnf, um die Größe der Bugzilla-Anhänge zu erhöhen
Setzen Sie das max_allowed_packet in /etc/my.cnf auf 4M, um die Größe der Bugzilla-Anhänge zu erhöhen.
# 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
Starten Sie mysqld nach dieser Änderung neu.
# service mysqld restart
12. Fehler mysql-Benutzer erstellen
Fügen Sie den Bugzilla-Benutzer (Bugs) wie unten gezeigt zur MySQL-Datenbank hinzu.
# 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. Erstellen Sie die Bugzilla-Datenbank
Führen Sie checksetup.pl (ohne Argumente) erneut aus, um die mysql-Bugzilla-Datenbank zu erstellen. Da die localconfig-Datei bereits existiert, wird beim zweiten Mal, wenn Sie checksetup.pl ausführen, die mysql-Datenbank basierend auf den Informationen aus der localconfig-Datei erstellt.
# ./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. Erstellen Sie ein Bugzilla-Administratorkonto.
Am Ende der Ausführung von ./checksetup.pl wird festgestellt, dass Sie kein Administratorkonto haben, und Sie werden aufgefordert, die Administrator-Anmeldeinformationen wie unten gezeigt einzugeben.
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. Apache für mod_perl konfigurieren
Benennen Sie das Bugzilla-Verzeichnis um. (d. h. die darin enthaltene Versionsnummer entfernen)
# cd /var/www/html # mv bugzilla-3.4.6/ bugzilla
Fügen Sie die folgenden zwei Zeilen zu httpd.conf
hinzu# 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
Vergewissern Sie sich, dass die Gruppe in httpd.conf mit der Webservergruppe in localconfig übereinstimmt
# cd /var/www/html/bugzilla/ # grep webservergroup localconfig $webservergroup = 'apache'; # grep Group /etc/httpd/conf/httpd.conf Group apache
16. Endgültige Ausführung von checksetup.pl
Führen Sie die checksetup.pl erneut aus.
# ./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. Melden Sie sich bei Bugzilla an und führen Sie die einmalige Einrichtung durch.
Starten Sie den Apache, gehen Sie zu http://{Ihre-IP-Adresse}/bugzilla und melden Sie sich mit dem Administratorkonto an, das Sie oben erstellt haben.
In der Bugzilla-Benutzeroberfläche in der Fußzeile -> Verwaltung -> Parameter -> ' Abschnitt „Erforderliche Einstellungen“ -> Füllen Sie die folgenden Informationen aus:
maintainer:[email protected]
URL-Basis:http://{Ihre-IP-Adresse}/
Hinweis:Gehen Sie je nach Konfiguration zu -> Benutzerauthentifizierung -> und Sie möchten möglicherweise die erforderlichen Anmelde- und E-Mail-Regexp-Parameter ändern.
Fehlerbehebung bei Bugzilla-Installationsproblemen
Problem 1:DBD::mysql-Modul fehlgeschlagen
Das Perl-Modul DBD:mysql schlug mit der Fehlermeldung „mysql.h:No such file or directory“ fehl, wie unten gezeigt.
# /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â
Lösung 1:mysql-devel installieren
Die Fehlermeldung „mysql.h:No such file or directory“ ist darauf zurückzuführen, dass das mysql-devel-Paket fehlte, wie unten gezeigt.
# 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
Installieren Sie das Paket mysql-devel wie unten gezeigt.
# yum install mysql-devel # rpm -qa | grep -i "mysql-devel" mysql-devel-5.0.77-4.el5_4.2
Die Installation von DBD::mysql wird jetzt ohne Probleme durchgeführt.
# /usr/bin/perl install-module.pl DBD::mysql
Problem 2:GD schlug mit fehlender gdlib-config / libgd fehl
Die Installation des GD-Moduls ist mit der folgenden Fehlermeldung fehlgeschlagen.
# /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
Lösung 2:gd-devel-Paket installieren
Installieren Sie libgd (d. h. gd-devel-Paket) wie unten gezeigt, um das Problem mit dem GD-Modul zu beheben.
# 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 wurde nach der Installation des Pakets gd-devel ohne Probleme installiert.
# /usr/bin/perl install-module.pl GD
Problem 3:Twig fehlgeschlagen mit expat.h-Fehler
Das Twig-Modul konnte nicht installiert werden mit der Fehlermeldung „expat.h:No such file or directory“, wie unten gezeigt.
# /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
Lösung 3:Installieren Sie expat und expat-devel für Twig
Installieren Sie das Paket expat und expat-devel wie unten gezeigt.
# yum install expat # yum install expat-devel
Installieren Sie jetzt Twig ohne Probleme.
# /usr/bin/perl install-module.pl XML::Twig
Problem 4:Image::Magick konnte nicht installiert werden
Die Installation von Image::Magick ist mit der Fehlermeldung „magick/MagickCore.h:No such file or directory“ fehlgeschlagen, wie unten gezeigt.
# /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
Lösung 4:Image::Magick konnte nicht installiert werden
Stellen Sie sicher, dass die folgenden ImageMagic-bezogenen Pakete vorhanden sind.
# 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
In meinem Fall fehlte ImageMagic-devel. Installieren Sie es also wie unten gezeigt. Danach wurde das Perl-Modul Image::Magick erfolgreich installiert.
# yum install ImageMagick-devel # /usr/bin/perl install-module.pl Image::Magick
Problem 5:SOAP::Lite konnte nicht installiert werden
Das SOAP::Lite-Modul konnte nicht installiert werden, mit der Meldung „Version.pm kann nicht in @INC gefunden werden“, wie unten gezeigt.
#/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
Lösung 5:Installieren Sie die für SOAP::Lite erforderliche version.pm
Installierte version.pm wie unten gezeigt. Danach wurde SOAP::Lite ohne Probleme installiert.
# perl -MCPAN -e 'install version' # /usr/bin/perl install-module.pl SOAP::Lite
Problem 6 (und Lösung 6):mod_perl fehlte
Installieren Sie mod_perl nicht mit /usr/bin/perl install-module.pl mod_perl2 . Verwenden Sie stattdessen yum, um mod_perl wie unten gezeigt zu installieren.
# yum install mod_perl
Problem 7:Apache-Start fehlgeschlagen
Das Starten von Apache ist mit der Fehlermeldung „Kann Template/Config.pm in @INC nicht finden“ fehlgeschlagen.
# 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
Lösung 7:Installieren Sie das Template-Tool Kit wie unten gezeigt
Installieren Sie das Template-Tool-Kit, um die obige Apache-Fehlermeldung zu beheben
# 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
Problem 8:Apache-Start erneut fehlgeschlagen
Das Starten von Apache ist mit der Fehlermeldung „Kann DateTime/Locale.pm in @INC nicht finden“ fehlgeschlagen.
# 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
Lösung8:Installieren Sie DateTime/Locale.pm wie unten gezeigt
Installieren Sie DateTime/Locale.pm, um die obige Apache-Fehlermeldung zu beheben
# cpan cpan> install DateTime:Locale
Wenn Sie in Ihrem Apache error_log ein Digest/SHA.pm-Problem sehen, sollten Sie es wie unten gezeigt installieren.
# tail -f /etc/httpd/logs/error_log Can't locate Digest/SHA.pm in @INC (@INC contains: # cpan cpan> install Digest::SHA