Difference between revisions of "NGS Server Setup"

From MusicBrainz Wiki
(further streamlining)
m (Redirecting to MusicBrainz Server/Setup)
(13 intermediate revisions by 7 users not shown)
Line 1: Line 1:
#REDIRECT [[MusicBrainz Server/Setup]]
<small>[[Products]] > [[MusicBrainz Server]] > NGS Server Setup</small>
== Next Generation MusicBrainz Server ==
To set up a Next Generation Schema (NGS) MusicBrainz server, you can choose to download and setup a virtual machine image of NGS or you can install the server into your own Linux instance.
== MusicBrainz NGS Virtual Server Image ==
Running an NGS virtual machine requires some Linux knowledge, but it vastly simpler than installing NGS from scratch. To use the virtual machine instance, follow these steps:
# Start downloading the latest [ftp://ftp.musicbrainz.org/pub/musicbrainz/vm/MusicBrainz_NGS_2011-05-16.ova virtual machine instance]. Beware: This is a large (4Gb) download!
# Download and install [http://virtualbox.org Virtual Box] on your machine.
# Start Virtual Box and choose ''Import Appliance'' from the File menu. Select the downloaded file.
# Once Virtual Box has imported the appliance, select the imported virtual machine from the list of virtual machines and click on Start.
# Once the instance has started up, log in on the console using the username ''musicbrainz'' and password ''musicbrainz''. This account has sudo privileges -- if you would like to set a root passwd, you can do that via sudo.
# Run ''ifconfig'' and look at the ''inet addr'' for eth0. This is the IP address of your virtual machine. Note this IP address.
# Optional: The console for Virtual Box is very slow. I find it faster to SSH into the virtual box with a good terminal program.
# To start the NGS server, enter these commands:
musicbrainz@clear:~$ cd musicbrainz-server/script
musicbrainz@clear:~/musicbrainz-server/script$ ./musicbrainz_server.pl -r
Now you can reach the MusicBrainz server by pointing your browser to port 3000 of the IP address in step 7. If your IP address from step 7 was:, then point your browser to
=== Troubleshooting ===
If you update the code base in this version of the virtual server, you may encounter an error that complains about DEVELOPMENT_SERVER not being defined, please add this line to your lib/DBDefs.pm file:
And then start the server.
== Setting up MusicBrainz NGS from source code ==
(First note: your mileage may vary -- this is one way, that works for some people; it's especially good if your package manager doesn't have all the perl dependencies for musicbrainz-server. However, it's possible it won't work for you at all!)
# Get a copy of musicbrainz-server from git: git clone git://git.musicbrainz.org/musicbrainz-server.git musicbrainz-server
# <code>cd musicbrainz-server</code>
Then, the next several blocks can be done in parallel or mostly-in-parallel:
* <code>cp lib/DBDefs.pm.default lib/DBDefs.pm</code> and edit lib/DBDefs.pm to set proper values for MB_SERVER_ROOT, WEB_SERVER, DEVELOPMENT_SERVER, and REPLICATION_TYPE. (DEVELOPMENT_SERVER should probably be changed to be set to 1; REPLICATION_TYPE is probably RT_STANDALONE for a development server)
*# Install OSSP::uuid, Test::WWW::Mechanize, local::lib, and app::cpanminus, likely from a package manager. Instructions for the first two on Debian/Ubuntu are in INSTALL; local::lib is liblocal-lib-perl; cpanminus you'll likely need to install on your own, with CPAN or via <code>curl -L http://cpanmin.us | perl - --self-upgrade</code> (or the same plus --sudo). For a non-package-manager way to install local::lib, see [http://search.cpan.org/~apeiron/local-lib-1.008004/lib/local/lib.pm the local::lib documentation]
*# Make sure the proper environment variables for local::lib are set (PERL5LIB, PERL_MM_OPT, MODULEBUILDRC, and PATH)
*# <code>cpanm .</code>
*##As of 2011-04-27, cpanm chokes on Method::Signature 0.67 -- use <code>cpanm http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Module-Signature-0.66.tar.gz</code> and restart <code>cpanm .</code> if this applies to you (at least one success, as of 2011-05-24)
*##Dbd::Pg may also have troubles. If so, install postgresql as in INSTALL and restart
*##If anything else fails, try to use a package manager or regular CPAN to install those things, or inspect ~/.cpanm/build.log and try to figure out what went wrong.
*#eventually this will move past installing dependencies, at which time it'll likely fail on you. As long as all the dependencies are installed (including OSSP::uuid and Test::WWW:Mechanize and everything they depend on), you're set to continue.
# follow the instructions in INSTALL on creating the database
# <code>./script/musicbrainz_server.pl -r</code> will start it running for you. Presuming this works, you're set!
Note that you won't have a search server after running this; since NGS has been released, the default search server will work for you! If you're curious, you can also install and set up your own search server, but that is beyond the scope of this document.
[[Category:Products]] [[Category:Server]]

Latest revision as of 01:36, 11 November 2011