|
Virtual MusicBrainz Server
This page has not been reviewed by our documentation team (more info).
Products > MusicBrainz Server > Server setup > Virtual MusicBrainz Server
What is the virtual MusicBrainz server?The virtual MusicBrainz server is a virtual machine image containing a Linux environment fully configured with the latest release of the mb_server source code. It is intended to be the fastest way to get you up and running if you want to experiment with the data or hack on some new features. The image is built using VMware Workstation. Windows and Linux users can run it using the free VMware Player or VMware Server software, and Mac users can use VMware Fusion. The image has hardware requirements of at least 512Mb of RAM and at least 10Gb of free disk space. What's in the image?The virtual server is running the base Debian stable installation. It also includes pre-configured versions of Apache, mod_perl, all the perl dependencies, and Postgresql. There is a full check-out of the latest MusicBrainz server release, and an empty MusicBrainz database. [TODO: Explain disk partitions. 4Gb root, 10Gb data. vmdx files will expand] Running the virtual MusicBrainz serverBefore you begin
First run
Loading data
TroubleshootingIf you see an error during the data load "Schema sequence mismatch - codebase is <number>, /home/mbserver/mbdump-derived.tar.bz2 is <other number>" then see this forum message http://forums.musicbrainz.org/viewtopic.php?pid=3516 If you run into a "line 129" error when importing the database, please visit this page: http://forums.musicbrainz.org/viewtopic.php?pid=9866#p9866 Hacking on the code[TODO: Link to some developer documentation] Working with the databaseIf you want to access Postgresql from other tools you should change two configurations files. Both are located in the configuration directory. If you use version 8.3 you'll find it under /etc/postgresql/8.3/main: in file pg_hba.conf put the following line:host all all 0.0.0.0 md5in file postgresql.conf listen_addresses = '*'After you are done remember to restart postgres /etc/init.d/postgresql-8.3 restart Also a change of the password of the postgres user is required: mserver@brainzvm:~/svn/mb_server$ ./admin/psql SYSTEM template1=# alter user postgres with password 'postgres'; template1=# \q Setting up your server as a replication "Slave"
Define your server as a replication "Slave"Change the type of your server: edit sub REPLICATION_TYPE { RT_STANDALONE }
to sub REPLICATION_TYPE { RT_SLAVE }
And define the READONLY Database connexion:
MusicBrainz::Server::Database->register_all(
{
# How to connect when we need read-write access to the database
READWRITE => {
database => "musicbrainz_db",
username => "musicbrainz_user",
password => "",
host => "",
port => "",
},
# How to connect for read-only access. See "REPLICATION_TYPE"
READONLY => {
database => "musicbrainz_db",
username => "musicbrainz_user",
password => "",
host => "",
port => "",
},
# How to connect for administrative access
SYSTEM => {
database => "template1",
username => "postgres",
password => "",
host => "",
port => "",
},
If you have just imported data with an RT_STANDALONE setting, the following extra steps are required: mserver@brainzvm:~/svn/mb_server$ ./admin/psql READWRITE < admin/sql/DropFKConstraints.sql mserver@brainzvm:~/svn/mb_server$ ./admin/psql RAWDATA < admin/sql/vertical/rawdata/DropFKConstraints.sql mserver@brainzvm:~/svn/mb_server$ ./admin/psql READWRITE < admin/sql/DropTriggers.sql Syncing your servermserver@brainzvm:~/svn/mb_server$ ./admin/replication/LoadReplicationChanges Replication changes are created each hour, so you can add the following entry to the mbserver crontab: 0 * * * * /home/mbserver/svn/mb_server/admin/cron/slave.sh |
| Original Design|vacubomb.com |
Contact details |
Server version: RELEASE-20090524 (tails) |