Skip to content

PROAI Installation

Ingolf Kuss edited this page Aug 28, 2024 · 19 revisions

Install OAI-PMH

Create Database

mysql -u root -p
CREATE DATABASE oaipmh;
CREATE USER 'oaipmh'@'localhost' IDENTIFIED BY '$MYSQL_OAI_PASSWORD';
SET PASSWORD FOR 'oaipmh'@'localhost' = PASSWORD('$MYSQL_OAI_PASSWORD');
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON oaipmh.* TO 'oaipmh'@'localhost';

Download Proai

cd /opt/toscience/git
git clone https://github.com/hbz/to.science.proai.git 
git clone https://github.com/hbz/to.science.oaiprovider.git 
cd /opt/toscience/git/to.science.proai/
git checkout dates
cd /opt/toscience/git/to.science.oaiprovider/
git checkout dates

Configure

editor /opt/toscience/conf/proai.properties
cp /opt/toscience/conf/proai.properties /opt/toscience/git/to.science.oaiprovider/src/config
editor /opt/toscience/conf/Identify.xml
# copy Identify to your html root e.g. /drupal
cp /opt/toscience/conf/Identify.xml /opt/toscience/drupal
# create local dirs for oai cache and sessions
mkdir /opt/toscience/oaipmh
mkdir /opt/toscience/oaipmh/cache
mkdir /opt/toscience/oaipmh/sessions

Prepare toscience

curl -XPOST -utoscience-admin localhost:9000/utils/initContentModels?namespace=""

This enables the right disseminators in fedora

Build oai-pmh.war

cd /opt/toscience/git/to.science.proai
ant release
cp dist/proai-1.1.3-1.jar ../to.science.oaiprovider/lib/
cd /opt/toscience/git/to.science.oaiprovider
ant release
cp dist/oaiprovider.war /opt/toscience/fedora/tomcat/webapps/oai-pmh.war

Running PROAI

Stop OAI-Service

localhost:8080/manager/html/stop?path=/dnb-urn 

Clean up

mysql -u root -p
DROP DATABASE oaipmh;
CREATE DATABASE oaipmh
rm -rf /opt/toscience/oaipmh/cache/*

Start OAI-Service

localhost:8080/manager/html/start?path=/dnb-urn 

Top