Install bugzilla on Fedora 10 without using perl CPAN

Posted in Linux , howto

This howto will get bugzilla with ALL of the optional modules installed on Fedora 10. If you just want a barebones bugzilla up and running, you might want to read the whole thing and then just look for the required parts. Otherwise, you can follow me through the install and end up with all the bells and whistles.

The checksetup.pl script will tell you what you’re missing and what you need to install to get bugzilla up and running. But the problem is it pushes you to use perl’s package management to build the perl modules which may or may not work. I think it’s best to use YUM to install and manage all of your packages and not to mix and match both. This will help to avoid conflicting packages and seemingly random complaints of a package missing when it’s not.

# /usr/bin/perl -MCPAN -e ‘install Email::Send’

Can’t locate CPAN.pm in @INC (@INC contains: /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/local/lib/perl5/site_perl/5.10.0 /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/local/lib/perl5/site_perl /usr/local/lib64/perl5/site_perl /usr/lib/perl5/site_perl .).
BEGIN failed–compilation aborted.

It’s not working right out of the box for me anyway, so lets see if the default yum repos have everything I need… Except, I’m not using the YUM installed bugzilla. Since everything you need pretty much runs from one place, I went for the latest stable release from the bugzilla website. But first, set up localconfig. Here’s mine, yours may be in /usr/share/bugzilla/, or wherever you install bugzilla, but I moved mine out into /etc/bugzilla.

# grep “^[^#]” /etc/bugzilla/localconfig

$create_htaccess = 1;
$webservergroup = ‘apache’;
$db_driver = ‘Pg’;
$db_host = ’super_dooper_ninja_server’;
$db_name = ‘bug_ninja_database_name’;
$db_user = ‘ninja_user’;
$db_pass = ‘ninja_throwing_stars’;
$db_port = 0;
$db_sock = ”;
$db_check = 1;
$index_html = 0;
$cvsbin = ‘/usr/bin/cvs’;
$interdiffbin = ‘/usr/bin/interdiff’;
$diffpath = ‘/usr/bin’;

Run the checksetup.pl script to see what’s missing, just don’t follow its instructions.

# cd /usr/share/bugzilla/
# ./checksetup.pl

This is Bugzilla 3.2.2 on perl 5.10.0
Running on Linux 2.6.27.5-117.fc10.x86_64 #1 SMP Tue Nov 18 11:58:53 EST 2008

Checking perl modules…
Checking for CGI (v2.93) ok: found v3.38
Checking for TimeDate (v2.21) not found
Checking for DBI (v1.41) not found
Checking for PathTools (v0.84) ok: found v3.2501
Checking for Template-Toolkit (v2.12) not found
Checking for Email-Send (v2.00) not found
Checking for Email-MIME-Modifier (any) not found

Checking available perl DBD modules…
Checking for DBD-Pg (v1.45) not found
Checking for DBD-mysql (v2.9003) not found

The following Perl modules are optional:
Checking for GD (v1.20) not found
Checking for Template-GD (any) not found
Checking for Chart (v1.0) not found
Checking for GDGraph (any) not found
Checking for GDTextUtil (any) not found
Checking for XML-Twig (any) not found
Checking for MIME-tools (v5.406) not found
Checking for libwww-perl (any) not found
Checking for PatchReader (v0.9.4) not found
Checking for PerlMagick (any) not found
Checking for perl-ldap (any) not found
Checking for SOAP-Lite (any) not found
Checking for HTML-Parser (v3.40) not found
Checking for HTML-Scrubber (any) not found
Checking for Email-MIME-Attachment-Stripper (any) not found
Checking for Email-Reply (any) not found
Checking for mod_perl (v1.999022) not found
Checking for CGI (v3.11) ok: found v3.38
Checking for Apache-DBI (v0.96) not found

/usr/bin/perl -MCPAN -e ‘install Email::Send’
/usr/bin/perl -MCPAN -e ‘install Template’
/usr/bin/perl -MCPAN -e ‘install Email::MIME::Modifier’
/usr/bin/perl -MCPAN -e ‘install DBI’
/usr/bin/perl -MCPAN -e ‘install Date::Format’

PostgreSQL: /usr/bin/perl -MCPAN -e ‘install DBD::Pg’
Minimum version required: 1.45
MySQL: /usr/bin/perl -MCPAN -e ‘install DBD::mysql’
Minimum version required: 2.9003

libwww-perl: /usr/bin/perl -MCPAN -e ‘install LWP::UserAgent’
GDGraph: /usr/bin/perl -MCPAN -e ‘install GD::Graph’
GDTextUtil: /usr/bin/perl -MCPAN -e ‘install GD::Text’
Template-GD: /usr/bin/perl -MCPAN -e ‘install Template::Plugin::GD::Image’
GD: /usr/bin/perl -MCPAN -e ‘install GD’
Email-Reply: /usr/bin/perl -MCPAN -e ‘install Email::Reply’
Email-MIME-Attachment-Stripper: /usr/bin/perl -MCPAN -e ‘install Email::MIME::Attachment::Stripper’
perl-ldap: /usr/bin/perl -MCPAN -e ‘install Net::LDAP’
HTML-Scrubber: /usr/bin/perl -MCPAN -e ‘install HTML::Scrubber’
HTML-Parser: /usr/bin/perl -MCPAN -e ‘install HTML::Parser’
XML-Twig: /usr/bin/perl -MCPAN -e ‘install XML::Twig’
MIME-tools: /usr/bin/perl -MCPAN -e ‘install MIME::Parser’
Chart: /usr/bin/perl -MCPAN -e ‘install Chart::Base’
PerlMagick: /usr/bin/perl -MCPAN -e ‘install Image::Magick’
PatchReader: /usr/bin/perl -MCPAN -e ‘install PatchReader’
SOAP-Lite: /usr/bin/perl -MCPAN -e ‘install SOAP::Lite’
mod_perl: /usr/bin/perl -MCPAN -e ‘install mod_perl2′
Apache-DBI: /usr/bin/perl -MCPAN -e ‘install Apache::DBI’

I started with the postgresql dbd module and the first optional module on the list, LWP User Agent. After you install these, you’ll end up with a bunch of dependencies installed, satisfying some more requirements.

# yum install perl-LWP-UserAgent-Determined

Dependencies Resolved

========================

Package Arch Version Repository Size

========================

Installing:
perl-LWP-UserAgent-Determined noarch 1.03-3.fc9 fedora 12 k
Installing for dependencies:
perl-Compress-Raw-Zlib x86_64 2.008-56.fc10 updates 77 k
perl-Compress-Zlib x86_64 2.008-56.fc10 updates 34 k
perl-HTML-Parser x86_64 3.59-1.fc10 updates 119 k
perl-HTML-Tagset noarch 3.10-8.fc9 fedora 15 k
perl-IO-Compress-Base x86_64 2.008-56.fc10 updates 58 k
perl-IO-Compress-Zlib x86_64 2.008-56.fc10 updates 139 k
perl-libwww-perl noarch 5.823-1.fc10 updates 392 k

# yum install perl-DBD-Pg
This will install perl-DBI and perl-DBD-Pg

# yum install perl-Graph perl-GDTextUtil perl-GD perl-Email-Reply perl-LDAP perl-Chart ImageMagick-perl perl-PatchReader perl-XML-Twig perl-Apache2-SOAP perl-Apache-DBI perl-Email-MIME-Attachment-Stripper mod_perl perl-HTML-Template perl-Mail-Sendmail

This will install a lot of dependencies… (here’s just a few)

Dependencies Resolved

========================

Package Arch Version Repository Size

========================

Installing:
perl-Chart noarch 2.4.1-6.fc9 fedora 321 k
perl-Email-Reply noarch 1.202-2.fc9 fedora 19 k
perl-GD x86_64 2.39-1.fc10 fedora 231 k
perl-GDTextUtil noarch 0.86-11.fc9 fedora 77 k
perl-Graph noarch 0.84-3.fc10 fedora 137 k
perl-LDAP noarch 1:0.34-4.fc9 fedora 328 k
Installing for dependencies:
perl-Convert-ASN1 noarch 0.21-3.fc9 fedora 42 k
perl-Email-Abstract noarch 2.134-3.fc9 fedora 31 k
perl-Email-Address noarch 1.888-3.fc9 fedora 36 k
perl-Email-MIME noarch 1.861-3.fc9 fedora 20 k
perl-Email-MIME-ContentType noarch 1.014-3.fc9 fedora 17 k
perl-Email-MIME-Creator noarch 1.454-2.fc9 fedora 18 k
perl-Email-MIME-Encodings noarch 1.311-3.fc9 fedora 7.9 k
perl-Email-MIME-Modifier noarch 1.442-3.fc9 fedora 12 k
perl-Email-MessageID noarch 1.351-3.fc9 fedora 8.1 k
perl-Email-Simple noarch 2.003-3.fc9 fedora 30 k
perl-Email-Simple-Creator noarch 1.424-2.fc9 fedora 16 k
perl-IO-Socket-SSL noarch 1.18-1.fc10 updates 65 k
perl-MIME-Types noarch 1.23-3.fc9 fedora 31 k
perl-Net-LibIDN x86_64 0.11-1.fc10 updates 39 k
perl-Net-SSLeay x86_64 1.35-1.fc10 fedora 241 k
perl-XML-LibXML x86_64 1:1.66-2.fc10 fedora 413 k
perl-XML-LibXML-Common x86_64 0.13-13.fc9 fedora 19 k
perl-XML-NamespaceSupport noarch 1.09-4.fc9 fedora 16 k
perl-XML-SAX noarch 0.16-5.fc9 fedora 78 k

Now you should just be missing 2 required modules:

/usr/bin/perl -MCPAN -e ‘install Email::Send’
/usr/bin/perl -MCPAN -e ‘install Template’

and 4 optional features:

GDGraph: /usr/bin/perl -MCPAN -e ‘install GD::Graph’
Template-GD: /usr/bin/perl -MCPAN -e ‘install Template::Plugin::GD::Image’
HTML-Scrubber: /usr/bin/perl -MCPAN -e ‘install HTML::Scrubber’
MIME-tools: /usr/bin/perl -MCPAN -e ‘install MIME::Parser’

Finish them up with one last batch of installations:
# yum install perl-Email-Send perl-Template-GD perl-MIME-tools perl-Email-MIME perl-HTML-Scrubber

Now when you run checksetup, there should be no missing modules, required or optional.
# ./checksetup.pl

This is Bugzilla 3.2.2 on perl 5.10.0
Running on Linux 2.6.27.5-117.fc10.x86_64 #1 SMP Tue Nov 18 11:58:53 EST 2008

Checking perl modules…
Checking for CGI (v2.93) ok: found v3.38
Checking for TimeDate (v2.21) ok: found v2.22
Checking for DBI (v1.41) ok: found v1.607
Checking for PathTools (v0.84) ok: found v3.2501
Checking for Template-Toolkit (v2.12) ok: found v2.19
Checking for Email-Send (v2.00) ok: found v2.192
Checking for Email-MIME-Modifier (any) ok: found v1.442

Checking available perl DBD modules…
Checking for DBD-Pg (v1.45) ok: found v2.11.6
Checking for DBD-mysql (v2.9003) not found

The following Perl modules are optional:
Checking for GD (v1.20) ok: found v2.39
Checking for Template-GD (any) ok: found v1.56
Checking for Chart (v1.0) ok: found v2.4.1
Checking for GDGraph (any) ok: found v1.44
Checking for GDTextUtil (any) ok: found v0.86
Checking for XML-Twig (any) ok: found v3.32
Checking for MIME-tools (v5.406) ok: found v5.427
Checking for libwww-perl (any) ok: found v5.823
Checking for PatchReader (v0.9.4) ok: found v0.9.5
Checking for PerlMagick (any) ok: found v6.4.0
Checking for perl-ldap (any) ok: found v0.34
Checking for SOAP-Lite (any) ok: found v0.710.07
Checking for HTML-Parser (v3.40) ok: found v3.59
Checking for HTML-Scrubber (any) ok: found v0.08
Checking for Email-MIME-Attachment-Stripper (any) ok: found v1.314
Checking for Email-Reply (any) ok: found v1.202
Checking for mod_perl (v1.999022) ok: found v2.000004
Checking for CGI (v3.11) ok: found v3.38
Checking for Apache-DBI (v0.96) ok: found v1.07
Reading /etc/bugzilla/localconfig…
Checking for DBD-Pg (v1.45) ok: found v2.11.6
There was an error connecting to PostgreSQL:

FATAL: role “bugzilla” does not exist

This might have several reasons:

PostgreSQL is not running.
PostgreSQL is running, but there is a problem either in the
server configuration or the database access rights. Read the Bugzilla
Guide in the doc directory. The section about database configuration
should help.
Your password for the ‘bugzilla’ user, specified in $db_pass, is
incorrect, in ‘/etc/bugzilla/localconfig’.
There is a subtle problem with Perl, DBI, or PostgreSQL. Make
sure all settings in ‘/etc/bugzilla/localconfig’ are correct. If all else fails, set
‘$db_check’ to 0.

Time to move on to the database setup. If you’re using MySQL it will be a little different.

Install postgresql and get it up and running using /etc/init.d/postgresql initdb.

Here’s what I already have installed and running.

postgresql.x86_64 8.3.6-1.fc10 installed
postgresql-devel.x86_64 8.3.6-1.fc10 installed
postgresql-libs.x86_64 8.3.6-1.fc10 installed
postgresql-python.x86_64 8.3.6-1.fc10 installed
postgresql-server.x86_64 8.3.6-1.fc10 installed

This should let you connect without a password on a vanilla installation:
# psql -U postgres

Welcome to psql 8.3.6, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

postgres=#

Create the user, then create the database. If you already have them setup, just make sure you go back and make sure the localconfig.pm matches.

User:

postgres=# create user ninja_user with password ‘ninja_throwing_stars’;
CREATE ROLE

Database:

postgres=# create database bug_ninja_database_name with owner=ninja_user;
CREATE DATABASE

Now when you run checksetup.pl, you should get a bunch of messages as it makes a new home in your freshly installed database.

Adding foreign key: watch.watched -> profiles.userid…
Adding foreign key: whine_events.owner_userid -> profiles.userid…
Adding foreign key: whine_queries.eventid -> whine_events.id…
Adding foreign key: whine_schedules.eventid -> whine_events.id…
Creating group admin…
Creating group tweakparams…
Creating group editusers…
Creating group creategroups…
Creating group editclassifications…
Creating group editcomponents…
Creating group editkeywords…
Creating group editbugs…
Creating group canconfirm…
Creating group bz_canusewhines…
Creating group bz_sudoers…
Creating group bz_canusewhineatothers…
Creating group bz_sudo_protect…
Adding a new user setting called ’skin’
Adding a new user setting called ‘quote_replies’
Adding a new user setting called ‘lang’
Adding a new user setting called ‘post_bug_submit_action’
Adding a new user setting called ‘per_bug_queries’
Adding a new user setting called ‘zoom_textareas’
Adding a new user setting called ‘csv_colsepchar’
Adding a new user setting called ’state_addselfcc’
Adding a new user setting called ‘comment_sort_order’
Adding a new user setting called ‘display_quips’

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: ninjas
Enter the real name of the administrator: ninja ninja
Enter a password for the administrator account:
Please retype the password to verify: abcdefg
ninja@ninjasninjasninjas.com 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.

Done!

Posted by admica   @   26 February 2009

Related Posts

1 Comments

Comments
Aug 9, 2009
1:52 am
#1 easylinux :

Hi ,

As an alternative you can inclued the bugzilla perl libs , so that it will not throw exceptios as like below Can’t locate CPAN.pm in @INC (@INC contains: /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/local/lib/perl5/site_perl/5.10.0

You may probably want to include some thing like below in your ./checksetup.pl

Regards,
Easylinux
http://easylinuxstuffs.blogspot.com

use lib //lib/

Leave a Comment

Name

Email

Website

Previous Post
« SheevaPlug $100 Linux wall-wart
Next Post
Install the OLPC XO’s Sugar desktop environment on Fedora 10 »
Powered by Wordpress   |   Lunated designed by ZenVerse