Created
July 10, 2015 17:28
-
-
Save OmgImAlexis/d058dcbec411ad273561 to your computer and use it in GitHub Desktop.
Install musicbrainz mirror
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install postgresql-8.4 postgresql-server-dev-8.4 postgresql-contrib | |
sudo apt-get install git-core | |
sudo apt-get install libxml2-dev libpq-dev libexpat1-dev libdb-dev memcached | |
sudo apt-get install libicu-dev automake make gcc gcc-multilib | |
sudo apt-get install autoconf2.13 autoconf-archive gnu-standards libtool lib64mudflap0 | |
sudo adduser musicbrainz | |
sudo visudo | |
#Add musicbrainz under root ( musicbrainz ALL=(ALL) ALL ) | |
su musicbrainz | |
cd /home/musicbrainz | |
git clone git://git.musicbrainz.org/musicbrainz-server.git | |
cd musicbrainz-server | |
cp lib/DBDefs.pm.default lib/DBDefs.pm | |
cd home/musicbrainz/musicbrainz-server/lib | |
sudo nano DBDefs.pm | |
Under "Directories", set MB_SERVER_ROOT to /home/musicbrainz/musicbrainz-server | |
Under "What type of server is this?", set REPLICATION_TYPE to { RT_SLAVE } | |
Set DB_STAGING_SERVER to 0 | |
cd .. | |
sudo cpan Carton | |
carton install --deployment | |
carton install DBD::Pg | |
carton install Catalyst::Plugin:ErrorCatcher | |
cd postgresql-musicbrainz-unaccent | |
sudo make | |
sudo make install | |
cd .. | |
cd postgresql-musicbrainz-collate | |
sudo make | |
sudo make install | |
cd .. | |
sudo nano /etc/postgresql/8.4/main/pg_hba.conf | |
#local all all trust | |
sudo su | |
su - postgres | |
createuser -d -a -P musicbrainz | |
createdb musicbrainz_db | |
psql -c "CREATE LANGUAGE plpgsql" | |
cd /home/musicbrainz/musicbrainz-server | |
download all the dumps ( ftp://ftp.musicbrainz.org/pub/musicbrainz/data/fullexport/ ) and put them in /home/musicbrainz/dumps | |
carton exec -- ./admin/InitDb.pl -- --createdb --import /home/musicbrainz/dumps/mbdump*.tar.bz2 --echo | |
carton exec -- plackup -Ilib -r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment