Setting up a MOBY Central Registry

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
  • follow the Apache install instructions; the simple version is:
  • ./configure –prefix=/usr/local/apache   ;   make  ;   make install
  • edit httpd.conf modified start as user and start as group to “nobody”
  • install expat (I use version 1.95.4) as per installation instructions
  • download appropriate source for mySQL
  • compile/install as per instructions
  • set permissions as per instructions.
  • EXCEPT don’t give root a password yet…
  • start mysql daemon
  • CPAN install  (using -j3 flag – dual processor – if appropriate for you)
    • Bundle::CPAN
    • LWP
    • HTML::Parser with unicode support (this might have caused some of the later problems)
    • Bundle::DBI
    • SOAP::Lite
    • XML::DOM
    • DBD::mysql
    • set CVS_RSH=ssh  in environment

     

    • START TO INSTALL MOBY CODE
    • anonymous CVS checkout of moby-live into ~/moby-live
    • cvs -d :pserver:cvs@cvs.open-bio.org:/home/repository/moby login
    • password is ‘cvs’
    • cvs -d :pserver:cvs@cvs.open-bio.org:/home/repository/moby checkout moby-live
    • cvs update -dP (the ‘P’ flag will clean-up your checkout and get rid of unused directories)

     

    • Install MOBY Perl code
    • cd moby-live/Perl
    • perl Makefile.PL (as root)
    • make
    • make install

     

    • SET UP ALL MOBY CENTRAL DATABASES
    • 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:
      • mobycentral
      • mobyobject
      • mobynamespace
      • mobyservice
      • mobyrelationship

       

  • CREATE A USER FOR THE MOBYCENTRAL DATABASES (must have write access to all).
    • 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 the method
      $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

     

  • SET UP YOUR OWN ONTOLOGY SERVER
    • In the moby-live/Perl/scripts folder there is a CGI called OntologyServer.cgi
      • Move this file into your webserver cgi-bin folder
        MS Windows users may need to rename this to OntologyServer.pl to get windows to recognize it as executable
  • CONFIGURE YOUR CLIENT PROGRAM (if you wish)
    • The Perl MOBY::Client::Central and the MOBY::Client::OntologyServer modules check environment variables to determine its default MOBY servers. 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
      • export MOBY_ONTOLOGYSERVER=http://localhost/cgi-bin/OntologyServer.cgi
  • Done!

    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. (there is an auto-cleansing in the test suite,but depending on the nature of your error it might not work since it uses MOBY calls to do so)

    Leave a Reply