MusicBrainz Server/Setup

From MusicBrainz Wiki
< MusicBrainz Server
Revision as of 08:06, 12 March 2006 by WolfSong (talk | contribs) ((Imported from MoinMoin))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Setting up a MusicBrainz Server

Attention.png Some data from ServerInstallationFAQ was moved here since the document did not contain any Q&A. This document probably needs some clean up now.

If you are considering helping out with MusicBrainz server development, the first thing you will need to do is to set up your own TestServer on your own machine. You will need to following things for this:

  • A linux box: A PIII-700 or better with 256MB RAM and 2Gb of free disk space is needed
  • Apache, Perl, mod_perl, PostgreSQL and a number of perl modules
  • Familiarity with CVS to check out the server source code.
  • Familiarity with compiling and installing packages from source on a Linux box.
  • Familiarity with patching packages is also helpful -- we can help with this if needed.

If you meet the above requirements you should view the complete installation instuctions in CVS. If you don't meet all the requirements, but you have Linux box to work on and are serious about learning new skills, join us in the IRC channel or post to Musicbrainz-devel and we will attempt to help out along when you get stuck.

There is more more information in how to install the server and load the correct dataset listed in ServerInstallationFAQ -- make sure to read this page before you download the mb_server module from CVS.

If you don't have a spare Linux PC handy, you can download and use a VirtualMusicBrainzServer.

The ServerBeginnersGuide may also be of use. DebianServerSetup is a work-in-progress. GentooServerSetup is just a note so far. If you just want the database, there are some notes on setting that up on MusicBrainzDatabase.

We realize that this is a stiff set of requirements to get started, but please don't let this discourage you. The INSTALL file is thorough and contains a lot of information, and thus also looks daunting. We recommend that you dive in and give it a try -- who knows how far you'll get and what you might learn along the way.

Once you get the MusicBrainz server running, dive in and tackle a task on the DevelopmentToDoList or send us mail via the help wanted page.

Download and Importing MusicBrainz Data

1. Download the code which matches whatever the MusicBrainz server is currently running.

 cvs -z3 checkout -P -r ''RELEASE_20040509-BRANCH'' mb_server 
 

2. Prerequisite: Postgres, at least version 7.3

You'll need a running copy of Postgres >= 7.3. It will help if you've got Postgres set up so that whatever user you're running as can connect (both as "postgres" and as your preferred database user) without a password.

3. Download a data dump

Go to http://ftp.musicbrainz.org/pub/musicbrainz/data/fullexport/ Go into whichever directory is marked as "latest". Download all the files in there.

(It doesn't have to be all, but for simplicity's sake we'll go with "all" for now). For a minimal setup, at least mbdump.tar.bz2 and mbdump-derived.tar.bz2 are required.

4. Import the data!

$ cd mb_server 
 
$ ./admin/InitDb.pl --createdb --echo --import /your/downloaded/mbdump*.tar.bz2 
 

Database import tips

I was having various problems with importing the database. The following seems to work for me:

(as user postgres)
initdb -E UNICODE --locale=C
(then edit pg_hba.conf & pg_ident.conf & start postgres)
createdb musicbrainz_db
createuser musicbrainz_user
createlang plpgsql -d musicbrainz_db
(as user www-data)
./admin/InitDb.pl --import mbdump*.tar.bz2
 

I spoke too soon - I've got further than before, but still haven't completed the import...

--ZeroGravitas

Notes

  • The server has never been ported to Windows, and we suspect that it would be a fair amount of work to make that happen.
  • You don't actually need to know SQL/Perl to setup the server. But if you plan on adding features to MusicBrainz, you will need Perl experience and likely also SQL experience.

+ there also is a graphic of the database structure that might help you