Installing 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 (use 1.X if you intend to use mod-perl; 2.x
    otherwise)
  • 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”
  • installed expat version 1.95.4 as per installation instructions
  • download Solaris 2.8 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
    • FAILED:  switched off -j3 flag to fix this problem
  • SOAP::Lite
    • included HTTPS support
    • tried to include Jabber support -> failed.  gave up.
    • installs XML::Parser as dependancy
    • XML::DOM
    • failed… don’t know why (even with -j3 off).  force install.
  • DBD::mysql
  • installed CVS
  • 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
      • 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.

  • CONFIGURE YOUR CLIENT PROGRAM (if you wish)
    • 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
  • 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.

     

    Leave a Reply