|
Virtual MusicBrainz Server
This page has not been reviewed by our documentation team (more info).
Products > Server > Server development > Server setup > Virtual MusicBrainz Server
What Is the Virtual MusicBrainz Server?The Virtual MusicBrainz Server is a virtual machine image containg a Linux environment fully configured with the latest release of the mb_server source code. If you want to experiment with the data, or try hacking on some new features, it is intended to be the fastest way to get up and running. The image is built using VMWare Workstation. Windows and Linux users can run it in the free VMWare Player or VMWare Server software, and Mac users can use VMWare Fusion. On the PC you're intending to run VMWare, you need 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
brainzvm:~# passwd root Enter new UNIX password: [enter a new password] Retype new UNIX password: [repeat it] passwd: password updated successfully brainzvm:~# passwd mbserver Enter new UNIX password: [enter a new password] Retype new UNIX password: [repeat it] passwd: password updated successfully
brainzvm:~# ping -c 3 google.com PING google.com (216.239.37.99) 56(84) bytes of data. 64 bytes from 216.239.37.99: icmp_seq=1 ttl=244 time=17.3 ms 64 bytes from 216.239.37.99: icmp_seq=2 ttl=244 time=17.9 ms 64 bytes from 216.239.37.99: icmp_seq=3 ttl=244 time=8.85 ms --- google.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2029ms rtt min/avg/max/mdev = 8.854/14.718/17.950/4.153 ms
brainzvm:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:62:7F:57
inet addr:192.168.213.42 Bcast:192.168.213.255 Mask:255.255.255.0
[ ^^^^^^^^^^^^^^ this is the address you care about ]
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
[snip]
Loading data
mbserver@brainzvm:~$ cd svn/mb_server mbserver@brainzvm:~/svn/mb_server$ svn up
mbserver@brainzvm:~/svn/mb_server$ su - Password: brainzvm:~# /etc/init.d/apache-perl stop Stopping web server: apache-perl. brainzvm:~# exit mbserver@brainzvm:~/svn/mb_server$ dropdb -U postgres musicbrainz_db DROP DATABASE mbserver@brainzvm:~/svn/mb_server$ dropdb -U postgres musicbrainz_db_raw DROP DATABASE mbserver@brainzvm:~/svn/mb_server$ ./admin/InitDb.pl --createdb --echo --import -- --tmp-dir=/mnt/data/tmp ~/mbdump*.tar.bz2 <snip> -- Go get some coffee and a book, cause this'll take at least an hour to run. Fri Oct 21 21:11:56 2005 : Initialized and imported data into the database. Fri Oct 21 21:11:56 2005 : InitDb.pl succeeded mbserver@brainzvm:~$ su - Password: brainzvm:~# /etc/init.d/apache-perl start Starting web server: apache-perl. brainzvm:~# exit
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 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 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'; 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 }
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/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: 20090524 |
Served by child pid:
5228 |
||