-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
116 lines (73 loc) · 3.99 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
Installing mb_server
--------------------
mb_server is the web front end to the MusicBrainz data (as displayed at
http://musicbrainz.org/), and this document explains how you can get everything
up and running.
We've tried to make installation as painless as possible, but first - a few
prerequisites:
Prequisites
-----------
1) Perl 5.8.0
Perl 5.8.0 (minimum) is required. You can use Perl 5.10.0, but be aware that it
has some quirks in handling subroutine attributes, which can make debugging
difficult in a few cases.
You can check your installed version of Perl with:
perl -v
2) Postgres 8.2
This is to set up the MusicBrainz database
Getting going
-------------
1) Make a checkout of the code.
svn co http://svn.musicbrainz.org/mb_server/trunk mb_server
2) Configure the server
cd mb_server
cp lib/DBDefs.pm.default lib/DBDefs.pm
cp lib/MusicBrainz/Server.pm.default lib/MusicBrainz/Server.pm
Edit the newly copied DBDefs.pm as need be. For the most part, it should be
fine to use as is. Refer to INSTALL for more indepth info about this, and
how it ties in with running a copy of the MusicBrainz database.
You can also edit the new Server.pm. This is mostly for server admins,
however - who require different stores for sessions, more control
over Debug output - etc. Developers will be OK to leave this as is.
3) Install prerequisite Perl modules
The Module::Install module reads a file called Makefile.PL to create a standard
Makefile. This Makefile can then be used to install dependant Perl modules. First,
make sure you have inc-Module-Install on your system:
perl -MCPAN -e 'install Module::Install'
Now, build the Makefile, and install dependancies (if necessary)
perl ./Makefile.PL
sudo make installdeps
This will generate a standard Makefile, which you can use to install dependancies:
4) Create the databases
You have 2 options when it comes to databases. You can either opt for a clean database,
with just the schema (useful for developers with little free diskspace), or you can use
a copy of the MusicBrainz data.
a) Using Clean Databases
To use clean databases, all you need to do is run:
./admin/InitDb.pl --createdb --clean
b) Using Database Dumps
MusicBrainz frequently do full dumps of the database, which you can import to your own
local database. This is the best option for long term developers. The database dumps are
stored at
ftp://ftp.musicbrainz.org/pub/musicbrainz/data/fullexport
To get going, you need at least the mbdump.tar.bz2 and mbdump-derived.tar.bz2 archives,
but you can grab whichever dumps suit your needs. Assuming the dumps have been downloaded
to `/tmp/dumps/' you can then import with:
./admin/InitDb.pl --createdb --import /tmp/dumps/mbdump*.tar.bz2 --echo
--echo just gives us a bit more feedback, in case this goes wrong - you can leave it off.
Remember to change the paths to your mbdump*.tar.bz2 files, if they are not in /tmp/dumps/.
5) Load WikiDocs transclusion file (optional)
If you would like to have the /doc pages load properly on a RT_STANDALONE installation, follow
these steps:
cd <mb_server>/root/static/wikidocs
curl http://musicbrainz.org/generated/wikitrans-index > index.txt
After this, the documentation index should be loadable.
6) Start the development server
You should now have everything ready to run the development server! The development server is
a lightweight HTTP server, that gives good debug output, and is much more convenient than having
to set up a full blown stack. Just run:
./script/musicbrainz_server.pl -r
Visiting http://your.machines.ip.address:3000 should now present you with the mb_server frontend.
If, however, this *doesn't* happen - please contact aCiD2 on IRC, or file a bug at
http://bugs.musicbrainz.org.
Good luck, and happy hacking!