User:OliverCharles/DebianSetup

From MusicBrainz Wiki
Jump to navigationJump to search

MusicBrainz::Server runs really nicely on Debian. Here's how you can get it running! I'm using Debian 5.0.4 (which was stable, at the time of writing)

First, we need a few modules just to kick the build process off.

apt-get install libmodule-install-perl git-core build-essential

Now we can clone the core.git repository and build a Makefile to work from.

git clone git://git.musicbrainz.org/musicbrainz-server/core.git musicbrainz-server
cd musicbrainz-server
perl Makefile.PL

You'll see you don't have most of the modules. You could let the Makefile grab this all for you, but that's going to stick a load of junk all over you Debian system. And I don't like other people leaving their junk all around my house, do you? So, cancel that (keep answering 'no') and lets take care of the easy modules that have Debian packages:

apt-get install libcatalyst-modules-perl libcatalyst-view-tt-perl libdbd-pg-perl libexception-class-perl libhtml-tiny-perl liblocale-po-perl liblist-moreutils-perl libmoose-perl libossp-uuid-perl libreadonly-perl libstring-shellquote-perl libtest-differences-perl libxml-feed-perl libyaml-perl

Stable does not have everything we need though, so we will need to setup some more modules. For this, we will use the excellent local::lib to avoid putting stuff that's not Debian maintianed in our system (and keeping it in our home directory)

cd ~
wget http://search.cpan.org/CPAN/authors/id/A/AP/APEIRON/local-lib-1.004009.tar.gz
tar xzf local-lib-1.004009.tar.gz 
cd local-lib-1.004009
perl Makefile.PL --bootstrap
make test
make install
echo 'eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)' >>~/.bashrc
. ~/.bashrc

This is just what it says to do on the local::lib CPAN page. Now, lets jump back in to installing the Perl modules we need (fullow the prompts you get on screen):

perl Makefile.pl
make installdeps

If you get tired of saying "yes" what a dependency is encountered, you might want to do this:

cpan
o conf prerequisites_policy follow
o conf commit
quit

Once you have done this, you should manually verify the Makefile.PL is indeed satisfied. If any lines do not have "...loaded" the module is missing, and you should install it. Make a note of these, and install them with CPAN:

cpan
install Module::Name::Here

If it still fails, you can force it, with "force install Module::Name::Here" In my experience, some need to be installed manually through CPAN, but doing this from a fresh Debian installation did not require any to be forced. YMMV