NOTE: you DO NOT need
to do this to use MOBY, nor to serve your own MOBY Services!
Only follow these instructions if you are a MOBY "expert"
and wish to run your own local registry…
- download Apache (use 1.X if you intend to use mod-perl; 2.x
- follow the Apache install instructions; the simple version
- ./configure –prefix=/usr/local/apache ; make
; make install
- edit httpd.conf modified start as user and start as group to “nobody”
- compile/install as per instructions
- set permissions as per instructions.
- EXCEPT – don’t give root a password yet…
- start mysql daemon
- HTML::Parser with unicode support (this might have caused some of the
- FAILED: switched off -j3 flag to fix this problem
- included HTTPS support
- tried to include Jabber support -> failed. gave up.
- installs XML::Parser as dependancy
- failed… don’t know why (even with -j3 off). force install.
- cvs -d :pserver:email@example.com:/home/repository/moby login
- password is ‘cvs’
- cvs -d :pserver:firstname.lastname@example.org:/home/repository/moby checkout
- cvs update -dP (the ‘P’ flag will clean-up your checkout
and get rid of unused directories)
- cd moby-live/Perl
- perl Makefile.PL (as root)
- make install
If you are going to bootstrap the databases with only the most primitive information, then simply run the ‘reset’ script in the
moby-live/Database folder and it will create all databases for you. You can then go on to the section on privilages.
- start mysql as root
- create databases:
- GRANT ALL PRIVILEGES ON [each database] TO moby_central@localhost
identified by “*********“;
- exit mysql
- If you have not bootstrapped with minimal information (see above), then for each (databasename) you need to load a mysql DUMP.
Either a bootstrap dump from the /Database folder of
the CVS, or a dump from the public MOBY Central registry.
- mysql -u moby_central -p mobycentral< ~/moby-live/Database/mobycentral.mysql
- mysql -u moby_central -p mobyrelationship< ~/moby-live/Database/mobyrelationship.mysql
- mysql -u moby_central -p mobynamespace< ~/moby-live/Database/mobynamespace.mysql
- mysql -u moby_central -p mobyobject< ~/moby-live/Database/mobyobject.data
- mysql -u moby_central -p mobyservice< ~/moby-live/Database/mobyservice.data
- NOTE: The database dumps called *.data in the /Database folder of the CVS contain
the bootstrap objects and services (primitives, base objects, base services,
relationship types, etc) so you should be ready to roll right away. If
you prefer a full dump of the existing MOBY Central database, call
$C->DUMP on MOBY::Client:Central, or call the procedure "DUMP"
on the public MOBY Central’s SOAP interface.
- SET UP MOBY CENTRAL CGI ON WEBSERVER
(asssuming cgi-bin is in /usr/local/apache/)
- cp ~/moby-live/Perl/scripts/MOBY-Central.pl /usr/local/apache/cgi-bin
- cp -r ~/moby-live/Perl/MOBY /usr/local/apache/cgi-bin
- edit your httpd.conf file to contain the following environment variable
(set it to your particular configuration):
- SetEnv MOBY_CENTRAL_CONFIG /usr/local/apache2/conf/mobycentral.config
- now create the file mobycentral.config and make the following entries (note that a template mobycentral.config file exists in the moby-live/Database folder of your CVS checkout):
[mobycentral] username = mysql_username password = mysql_password url = localhost port = 3306 dbname = mobycentral [mobyobject] username = mysql_username password = mysql_password url = localhost port = 3306 dbname = mobyobject [mobynamespace] username = mysql_username password = mysql_password url = localhost port = 3306 dbname = mobynamespace [mobyservice] username = mysql_username password = mysql_password url = localhost port = 3306 dbname = mobyservice [mobyrelationship] username = mysql_username password = mysql_password url = localhost port = 3306 dbname = mobyrelationship
- restart apache
- In the moby-live/Perl/scripts folder there is a CGI called OntologyServer.cgi
- Move this file into your webserver cgi-bin folder
- You will now have to do a bit of hand-modification of code (sorry!)
- the MOBY::Client::OntologyServer.pm module is hard-coded to point to the OntologyServer.cgi at the public MOBY Central.
You will have to change the line that reads
host => [“http://mobycentral.icapture.ubc.ca/cgi-bin/OntologyServer.cgi”,’read/write’] to point
to the URL of your OntologyServer.cgi that you just set up.
- The Perl MOBY::Client::Central module checks environment variables
to determine its default MOBY Registry server. If you want the registry
that you just created to be the server that you connect to by default
then set up the following environment variables (either in your .bashrc
or in /etc/profile)
- export MOBY_SERVER=http://localhost/cgi-bin/MOBY-Central.pl
- export MOBY_URI=http://localhost/MOBY/Central
To test all this, run the /Perl/scripts/testMOBYClientCentral_v05.pl script.
If it is configured properly it will run a series of tests against your local
registry. The tests ‘clean up’ after themselves, leaving your registry in
the same state that it was when you started the test suite. If there is a
failure in the tests, you will need to track down the source of the failure
and then re-run the test script to ensure that your registry is cleaned up.