How to set up the Fedora OAI Provider Service

To expose the DOMS objects to the Summa Storage layer you need to have the OAI Provider Service running on top of your Fedora installation. The OAI Provider installation files and source code can be found in the DOMS SVN repository under the test/lib folder.

Important: It is extremely important that the OAI Provider Service version number matches your Fedora version number. Keep this in mind if Fedora is ever upgraded (Fedora version as of writing is 2.2.1 and matching OAI Provider version is 1.1).

New: Easy OAI Provider Webservice Setup and Deploy Script

  1. Set up the DOMS test installation. Do not ingest any objects.

  2. Execute oaiprovidersetup.sh in the test/bin folder with the doms test installation folder just created as argument. It will prompt for the root password to the MySQL installation, create a proai database with the name proai, edit the proai properties and deploy the oai harvester in the test folder.

  3. Try ingesting the base collection (look at InstallIngestPackageTestStep and IngestObjectsTestStep for help).

  4. And check Identify.xml: http://localhost:7900/oaiprovider/?verb=Identify.

  5. You are done :).
  6. You can also try ingesting the test collection (look at InstallIngestPackageTestStep, InstallPreIngestPackageTestStep, IngestObjectsTestStep, DisseminatorInstall).

  7. And then you can check http://localhost:7900/oaiprovider/?verb=ListRecords&metadataPrefix=indexRepresentation.

Old: Manual OAI Provider Webservice Setup and Deploy

If you want to install the OAI Provider manually, the following should still work.

The TestSetup page suggests installing the DOMS test installation in a ~/mydoms directory. Replace <<MYDOMS>> with your DOMS test installation directory in the following. And replace <<PROJECTS/DOMS>> with your DOMS project directory.

cd ~/<<MYDOMS>>/server
unzip ~/<<PROJECTS/DOMS>>/test/lib/oaiprovider-1.1.zip
unzip ~/<<PROJECTS/DOMS>>/test/lib/oaiprovider-1.1-src.zip

Set up a mysql user for the oaiprovider service and a database named "proai" (alternatively use phpMyAdmin if you want a gui tool):

mysql -u root -p
CREATE DATABASE proai;
GRANT ALL PRIVILEGES on *.* to 'proai'@'%' identified by 'proai' WITH GRANT OPTION;
GRANT ALL PRIVILEGES on *.* to 'proai'@'localhost' identified by 'proai' WITH GRANT OPTION;
GRANT ALL PRIVILEGES on *.* to 'proai' identified by 'proai' WITH GRANT OPTION;
exit;

or if you already have a proai database and user, you should clear the proai cache to start over:

mysqldump -uproai -pproai --add-drop-table --no-data proai|grep ^DROP|mysql -uproai -pproai proai

Now deploy the oaiprovider webservice into the running tomcat of Fedora. Note that in a production environment it is probably better to deploy the oaiprovider service in another separate tomcat.

cp ~/<<MYDOMS>>/server/oaiprovider-1.1/oaiprovider.war ~/<<MYDOMS>>/tomcat/webapps

Now edit the file ~/<<MYDOMS>>/tomcat/webapps/oaiprovider/WEB-INF/classes/proai.properties to make sure the following is set correctly (replace <<USERNAME>> with your username). Change the first six items; add the last three.

To configure proper logging edit the file ~/<<MYDOMS>>/tomcat/webapps/oaiprovider/WEB-INF/classes/log4j.xml accordingly:

Log4j will not log anything unless the parent dir of the log file exists, therefore:

mkdir -p  ~/<<MYDOMS>>/proai/log

Make sure that the resource index is turned on. This should have been done by domssetup.sh. In ~/<<MYDOMS>>/server/config/fedora.fcfg in <module role="fedora.server.resourceIndex.ResourceIndex" class="fedora.server.resourceIndex.ResourceIndexModule"> the level should be 2:

To make sure the new settings are used correctly restart the DOMS test installation

~/<<MYDOMS>>/bin/stop.sh
~/<<MYDOMS>>/bin/start.sh

Try ingesting the base collection and check Identify.xml: http://localhost:7900/oaiprovider/?verb=Identify (look at InstallIngestPackageTestStep and IngestObjectsTestStep for help).

OAIProviderSetup (last edited 2010-03-17 13:12:55 by localhost)