9C1 Newbee
Patron
- Joined
- Oct 9, 2012
- Messages
- 485
Get it set up and we can use yours ;)
# Install dependencies pkg install -y nano postgresql93-server postgresql93-contrib memcached # Enable postgres and memcached nano /etc/rc.conf # Append to end of file postgresql_enable="YES" memcached_enable="YES" # CTL-O, CTL-X to save and quit nano # Exit jail and get to root@FreeNAS exit nano /etc/sysctl.conf # Append to end of file security.jail.sysvipc_allowed=1 # CTL-O, CTL-X to save and quit nano
jls #look for jail id of Musicbrainz Server jail -m jid=<insert jailID here> allow.sysvipc=1 jexec <insert jailID here> tcsh # You're now back in root@jail /usr/local/etc/rc.d/postgresql initdb su pgsql $ /usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/pg.log start $ createuser -P pg_test # Enter password $ /usr/local/bin/createdb db_test -O pg_test --encoding=UNICODE $ createuser -P -s postgres # Enter password exit # console should now be back at root@jail # more dependencies pkg install -y git phantomjs devel/icu # start memcached /usr/local/bin/memcached -d -u nobody # download MusicBrainz server from git into a directory # of your choosing, I'm using /home mkdir /home cd /home rehash git clone --recursive git://github.com/metabrainz/musicbrainz-server.git # ***Begin configuration*** cd /home/musicbrainz-server/ cp lib/DBDefs.pm.sample lib/DBDefs.pm nano lib/DBDefs.pm # change MB_SERVER_ROOT to your desired location (/home/musicbrainz-server for me) # add password, host and port to READWRITE, READONLY and SYSTEM # in my case (local server) server and port are 127.0.0.1 and 5432 # change WEB_SERVER to "127.0.0.1:5000" (we will only be running a local mirror) # change REPLICATION_TYPE to RT_SLAVE # change DB_STAGING_SERVER to 0 # Install CPAN modules, I used a different order than the original guide. # I also had to deviate from instructions on the first one and use the instructions on the GIT install page cpan App::cpanminus #answered "yes" and "yes" when prompted cpanm --uninst-shadows ExtUtils::MakeMaker cpanm Carton cpanm --installdeps --notest . pkg install -y libxml2 # reported already installed for me, not sure if I did it already or # if it was installed during the "cpanm ." step. cat Makefile.PL | grep ^requires >cpanfile carton install # This step takes awhile... # More CPAN modules... cpanm Hash::Merge #already installed for me cpanm JSON::Syck cpanm Net::CoverArtArchive::CoverArt #still in your ./musicbrainz-server directory... pkg install -y gmake cd postgresql-musicbrainz-unaccent && gmake && gmake install && cd .. cd postgresql-musicbrainz-collate && gmake && gmake install && cd .. # I mucked around with this file too much in a previous try, # so this time I'm making a backup first... cd /usr/local/pgsql/data cp postgresql.conf postgresql.conf.bk nano postgresql.conf # remove "#" before listen_address = 'localhost' # CTL-O, CTL-X to save and quit nano nano pg_hba.conf # go to the bottom and comment all lines except the one that says "local all all trust" # note: Doing this results in a suboptimal security setting, but right now I'm just trying to get it working...
cd /home/
mkdir dbdump
cd dbdump
# For simplicity I'm just fetching the whole directory, you really only need the bz2 files...
# This step will take awhile, you're downloading about 3GB of data from the web...
fetch ftp://ftp.musicbrainz.org/pub/musicbrainz/data/fullexport/<insert code here>/*.*
cd /home/musicbrainz-server
# Now it's time to import the db dump to your local pgsql database, this will take time.
# Screw coffee, go out and grab a beer at the pub...
./admin/InitDb.pl --createdb --import /home/dbdump/mbdump*.tar.bz2 --echo
cpanm --self-contained Set::Scalar
So has anyone actually gotten this figured out? I'm somewhat interested in this now and I'd really like to see a good guide on this (even if I have to write it myself) but I don't feel that the potential problems have been resolved.
Mon Aug 25 02:45:23 2014 : Initialized and imported data into the database. Mon Aug 25 02:45:24 2014 : InitDb.pl succeeded
Watching ./lib app.psgi for file updates. Can't locate package MooseX::Role::Parameterized::Meta::Role::Parameterizable for @MusicBrainz::Server::Controller::Role::Meta::Parameterizable::ISA at /usr/local/lib/perl5/site_perl/5.16/mach/Class/MOP/Class.pm line 958. Error while loading /home/musicbrainz-server/app.psgi: The Metaclass MusicBrainz::Server::Controller::Role::Meta::Parameterizable must be a subclass of Moose::Meta::Role. at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Exception.pm line 37 Moose::Exception::_build_trace('Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole=HASH(0x80f116be8)') called at reader Moose::Exception::trace (defined at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Exception.pm line 9) line 7 Moose::Exception::trace('Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole=HASH(0x80f116be8)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Exception.pm line 49 Moose::Exception::BUILD('Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole=HASH(0x80f116be8)', 'HASH(0x80f11a738)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Class/MOP/Method.pm line 126 Class::MOP::Method::execute('Moose::Meta::Method=HASH(0x80f1bccf0)', 'Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole=HASH(0x80f116be8)', 'HASH(0x80f11a738)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Object.pm line 55 Moose::Object::BUILDALL('Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole=HASH(0x80f116be8)', 'HASH(0x80f11a738)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Meta/Class.pm line 281 Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0x80f1bbe40)', 'HASH(0x80f11a738)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Object.pm line 26 Moose::Object::new('Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole', 'role_name', 'MusicBrainz::Server::Controller::Role::Meta::Parameterizable') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Util.pm line 52 Moose::Util::throw_exception('MetaclassMustBeASubclassOfMooseMetaRole', 'role_name', 'MusicBrainz::Server::Controller::Role::Meta::Parameterizable') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Role.pm line 124 Moose::Role::init_meta('Moose::Role', 'for_class', 'Moose::Exception::Role::Role', 'metaclass', 'MusicBrainz::Server::Controller::Role::Meta::Parameterizable', 'meta_name', 'meta') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Exporter.pm line 476 MooseX::Role::Parameterized::import('MooseX::Role::Parameterized') called at lib/MusicBrainz/Server/Controller/Role/Load.pm line 2 MusicBrainz::Server::Controller::Role::Load::BEGIN at lib/MusicBrainz/Server/Controller/Role/Load.pm line 2 eval {...} at lib/MusicBrainz/Server/Controller/Role/Load.pm line 2 require MusicBrainz/Server/Controller/Role/Load.pm at /usr/local/lib/perl5/site_perl/5.16/Module/Runtime.pm line 317 Module::Runtime::require_module('MusicBrainz::Server::Controller::Role::Load') called at /usr/local/lib/perl5/site_perl/5.16/Module/Runtime.pm line 348 Module::Runtime::use_module('MusicBrainz::Server::Controller::Role::Load') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Util.pm line 150 Moose::Util::_apply_all_roles('Moose::Meta::Class::__ANON__::SERIAL::14=HASH(0x80f104c48)', undef, 'MusicBrainz::Server::Controller::Role::Load', 'HASH(0x80f116690)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Util.pm line 117 Moose::Util::apply_all_roles('Moose::Meta::Class::__ANON__::SERIAL::14=HASH(0x80f104c48)', 'MusicBrainz::Server::Controller::Role::Load', 'HASH(0x80f116690)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose.pm line 60 Moose::with('Moose::Meta::Class::__ANON__::SERIAL::14=HASH(0x80f104c48)', 'MusicBrainz::Server::Controller::Role::Load', 'HASH(0x80f116690)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Exporter.pm line 411 Moose::with('MusicBrainz::Server::Controller::Role::Load', 'HASH(0x80f116690)') called at lib/MusicBrainz/Server/Controller/Tag.pm line 9 require MusicBrainz/Server/Controller/Tag.pm at /usr/local/lib/perl5/site_perl/5.16/Catalyst/Utils.pm line 308 eval {...} at /usr/local/lib/perl5/site_perl/5.16/Catalyst/Utils.pm line 308 Catalyst::Utils::ensure_class_loaded('MusicBrainz::Server::Controller::Tag', 'HASH(0x80b5f3e70)') called at /usr/local/lib/perl5/site_perl/5.16/Catalyst.pm line 2686 Catalyst::setup_components('MusicBrainz::Server') called at /usr/local/lib/perl5/site_perl/5.16/Catalyst.pm line 1216 Catalyst::setup('MusicBrainz::Server', 'StackTrace', 'Session', 'Session::State::Cookie', 'Cache', 'Authentication', 'Unicode::Encoding', 'Session::Store::MusicBrainz', '-Debug', 'Cache::HTTP') called at lib/MusicBrainz/Server.pm line 215 require MusicBrainz/Server.pm at /home/musicbrainz-server/app.psgi line 26 Plack::Sandbox::_2fhome_2fmusicbrainz_2dserver_2fapp_2epsgi::BEGIN at lib/MusicBrainz/Server/Controller/Role/Load.pm line 2 eval {...} at lib/MusicBrainz/Server/Controller/Role/Load.pm line 2 require /home/musicbrainz-server/app.psgi at (eval 22) line 3 eval 'package Plack::Sandbox::_2fhome_2fmusicbrainz_2dserver_2fapp_2epsgi; { my $app = do $_file; if ( !$app && ( my $error = $@ || $! )) { die $error; } $app; } ;' at /usr/local/lib/perl5/site_perl/5.16/Plack/Util.pm line 117 Plack::Util::_load_sandbox('/home/musicbrainz-server/app.psgi') called at /usr/local/lib/perl5/site_perl/5.16/Plack/Util.pm line 133 Plack::Util::load_psgi('app.psgi') called at /usr/local/lib/perl5/site_perl/5.16/Plack/Runner.pm line 179 Plack::Runner::__ANON__ at /usr/local/lib/perl5/site_perl/5.16/Plack/Runner.pm line 24 Plack::Runner::__ANON__ at /usr/local/lib/perl5/site_perl/5.16/Plack/Runner.pm line 24 Plack::Runner::__ANON__ at /usr/local/lib/perl5/site_perl/5.16/Plack/Runner.pm line 24 Plack::Runner::__ANON__ at /usr/local/lib/perl5/site_perl/5.16/Plack/Runner.pm line 24 Plack::Runner::__ANON__ at /usr/local/lib/perl5/site_perl/5.16/Plack/Loader/Restarter.pm line 31 Plack::Loader::Restarter::_fork_and_start('Plack::Loader::Restarter=HASH(0x80184d6d8)', 'Plack::Handler::Standalone=HASH(0x8025e2150)', undef) called at /usr/local/lib/perl5/site_perl/5.16/Plack/Loader/Restarter.pm line 61 Plack::Loader::Restarter::run('Plack::Loader::Restarter=HASH(0x80184d6d8)', 'Plack::Handler::Standalone=HASH(0x8025e2150)') called at /usr/local/lib/perl5/site_perl/5.16/Plack/Runner.pm line 277 Plack::Runner::run('Plack::Runner=HASH(0x80184d510)') called at /usr/local/bin/plackup line 10 BEGIN failed--compilation aborted at lib/MusicBrainz/Server/Controller/Role/Load.pm line 2. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.16/Module/Runtime.pm line 317. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.16/Catalyst/Utils.pm line 308. Compilation failed in require at /home/musicbrainz-server/app.psgi line 26. BEGIN failed--compilation aborted at /home/musicbrainz-server/app.psgi line 26.
Eh, still no luck (with either FreeNAS or the prebuilt VM image). I guess I'll just set this up on a Ubuntu server VM on a different host...
If anyone can make sense of this, here's the output when I attempt to run "plackup -Ilib -r"
Code:Watching ./lib app.psgi for file updates. Can't locate package MooseX::Role::Parameterized::Meta::Role::Parameterizable for @MusicBrainz::Server::Controller::Role::Meta::Parameterizable::ISA at /usr/local/lib/perl5/site_perl/5.16/mach/Class/MOP/Class.pm line 958. Error while loading /home/musicbrainz-server/app.psgi: The Metaclass MusicBrainz::Server::Controller::Role::Meta::Parameterizable must be a subclass of Moose::Meta::Role. at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Exception.pm line 37 Moose::Exception::_build_trace('Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole=HASH(0x80f116be8)') called at reader Moose::Exception::trace (defined at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Exception.pm line 9) line 7 Moose::Exception::trace('Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole=HASH(0x80f116be8)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Exception.pm line 49 Moose::Exception::BUILD('Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole=HASH(0x80f116be8)', 'HASH(0x80f11a738)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Class/MOP/Method.pm line 126 Class::MOP::Method::execute('Moose::Meta::Method=HASH(0x80f1bccf0)', 'Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole=HASH(0x80f116be8)', 'HASH(0x80f11a738)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Object.pm line 55 Moose::Object::BUILDALL('Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole=HASH(0x80f116be8)', 'HASH(0x80f11a738)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Meta/Class.pm line 281 Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0x80f1bbe40)', 'HASH(0x80f11a738)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Object.pm line 26 Moose::Object::new('Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole', 'role_name', 'MusicBrainz::Server::Controller::Role::Meta::Parameterizable') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Util.pm line 52 Moose::Util::throw_exception('MetaclassMustBeASubclassOfMooseMetaRole', 'role_name', 'MusicBrainz::Server::Controller::Role::Meta::Parameterizable') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Role.pm line 124 Moose::Role::init_meta('Moose::Role', 'for_class', 'Moose::Exception::Role::Role', 'metaclass', 'MusicBrainz::Server::Controller::Role::Meta::Parameterizable', 'meta_name', 'meta') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Exporter.pm line 476 MooseX::Role::Parameterized::import('MooseX::Role::Parameterized') called at lib/MusicBrainz/Server/Controller/Role/Load.pm line 2 MusicBrainz::Server::Controller::Role::Load::BEGIN at lib/MusicBrainz/Server/Controller/Role/Load.pm line 2 eval {...} at lib/MusicBrainz/Server/Controller/Role/Load.pm line 2 require MusicBrainz/Server/Controller/Role/Load.pm at /usr/local/lib/perl5/site_perl/5.16/Module/Runtime.pm line 317 Module::Runtime::require_module('MusicBrainz::Server::Controller::Role::Load') called at /usr/local/lib/perl5/site_perl/5.16/Module/Runtime.pm line 348 Module::Runtime::use_module('MusicBrainz::Server::Controller::Role::Load') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Util.pm line 150 Moose::Util::_apply_all_roles('Moose::Meta::Class::__ANON__::SERIAL::14=HASH(0x80f104c48)', undef, 'MusicBrainz::Server::Controller::Role::Load', 'HASH(0x80f116690)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Util.pm line 117 Moose::Util::apply_all_roles('Moose::Meta::Class::__ANON__::SERIAL::14=HASH(0x80f104c48)', 'MusicBrainz::Server::Controller::Role::Load', 'HASH(0x80f116690)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose.pm line 60 Moose::with('Moose::Meta::Class::__ANON__::SERIAL::14=HASH(0x80f104c48)', 'MusicBrainz::Server::Controller::Role::Load', 'HASH(0x80f116690)') called at /usr/local/lib/perl5/site_perl/5.16/mach/Moose/Exporter.pm line 411 Moose::with('MusicBrainz::Server::Controller::Role::Load', 'HASH(0x80f116690)') called at lib/MusicBrainz/Server/Controller/Tag.pm line 9 require MusicBrainz/Server/Controller/Tag.pm at /usr/local/lib/perl5/site_perl/5.16/Catalyst/Utils.pm line 308 eval {...} at /usr/local/lib/perl5/site_perl/5.16/Catalyst/Utils.pm line 308 Catalyst::Utils::ensure_class_loaded('MusicBrainz::Server::Controller::Tag', 'HASH(0x80b5f3e70)') called at /usr/local/lib/perl5/site_perl/5.16/Catalyst.pm line 2686 Catalyst::setup_components('MusicBrainz::Server') called at /usr/local/lib/perl5/site_perl/5.16/Catalyst.pm line 1216 Catalyst::setup('MusicBrainz::Server', 'StackTrace', 'Session', 'Session::State::Cookie', 'Cache', 'Authentication', 'Unicode::Encoding', 'Session::Store::MusicBrainz', '-Debug', 'Cache::HTTP') called at lib/MusicBrainz/Server.pm line 215 require MusicBrainz/Server.pm at /home/musicbrainz-server/app.psgi line 26 Plack::Sandbox::_2fhome_2fmusicbrainz_2dserver_2fapp_2epsgi::BEGIN at lib/MusicBrainz/Server/Controller/Role/Load.pm line 2 eval {...} at lib/MusicBrainz/Server/Controller/Role/Load.pm line 2 require /home/musicbrainz-server/app.psgi at (eval 22) line 3 eval 'package Plack::Sandbox::_2fhome_2fmusicbrainz_2dserver_2fapp_2epsgi; { my $app = do $_file; if ( !$app && ( my $error = $@ || $! )) { die $error; } $app; } ;' at /usr/local/lib/perl5/site_perl/5.16/Plack/Util.pm line 117 Plack::Util::_load_sandbox('/home/musicbrainz-server/app.psgi') called at /usr/local/lib/perl5/site_perl/5.16/Plack/Util.pm line 133 Plack::Util::load_psgi('app.psgi') called at /usr/local/lib/perl5/site_perl/5.16/Plack/Runner.pm line 179 Plack::Runner::__ANON__ at /usr/local/lib/perl5/site_perl/5.16/Plack/Runner.pm line 24 Plack::Runner::__ANON__ at /usr/local/lib/perl5/site_perl/5.16/Plack/Runner.pm line 24 Plack::Runner::__ANON__ at /usr/local/lib/perl5/site_perl/5.16/Plack/Runner.pm line 24 Plack::Runner::__ANON__ at /usr/local/lib/perl5/site_perl/5.16/Plack/Runner.pm line 24 Plack::Runner::__ANON__ at /usr/local/lib/perl5/site_perl/5.16/Plack/Loader/Restarter.pm line 31 Plack::Loader::Restarter::_fork_and_start('Plack::Loader::Restarter=HASH(0x80184d6d8)', 'Plack::Handler::Standalone=HASH(0x8025e2150)', undef) called at /usr/local/lib/perl5/site_perl/5.16/Plack/Loader/Restarter.pm line 61 Plack::Loader::Restarter::run('Plack::Loader::Restarter=HASH(0x80184d6d8)', 'Plack::Handler::Standalone=HASH(0x8025e2150)') called at /usr/local/lib/perl5/site_perl/5.16/Plack/Runner.pm line 277 Plack::Runner::run('Plack::Runner=HASH(0x80184d510)') called at /usr/local/bin/plackup line 10 BEGIN failed--compilation aborted at lib/MusicBrainz/Server/Controller/Role/Load.pm line 2. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.16/Module/Runtime.pm line 317. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.16/Catalyst/Utils.pm line 308. Compilation failed in require at /home/musicbrainz-server/app.psgi line 26. BEGIN failed--compilation aborted at /home/musicbrainz-server/app.psgi line 26.
cpanm MooseX::Role:Parameterized::Meta::Role:Parameterizable
cpanm MooseX::Role:Parameterized::Meta::Role:Parameterizable ! Finding MooseX::Role:Parameterized::Meta::Role:Parameterizable on cpanmetadb failed. ! Finding MooseX::Role:Parameterized::Meta::Role:Parameterizable () on mirror http://www.cpan.org failed. ! Couldn't find module or a distribution MooseX::Role:Parameterized::Meta::Role:Parameterizable
cpanm MooseX::Role::Parameterized::Meta::Role::Parameterizable