...
Set up Tomcat. On Xubuntu, for example, setting up Tomcat is a simple command: "sudo apt-get install tomcat7". On other systems, use the appropriate build-in package manager (e.g. yum, portage) to install Tomcat (or visit the Apache Tomcat project documentation for more installation options). After installing and deploying Tomcat, you should be able to see the Tomcat welcome screen when you visit http://localhost:8080
...
Use either the pre-packaged WAR file (.war) from webapp-plus project or build Fedora from source to get a WAR file. Copy the WAR to the Tomcat root directory <CATALINA_HOME>/webapps. Start/restart Tomcat, and http://localhost:8080/<fcrepo>/rest should display the Fedora repository front page.
(<fcrepo> is the name of the .war file minus the .war extension and it the exact file name can vary on build number/release number.)
Install the fcrepo-oaiprovider library dependencies
...
Obtain and build the fcrepo-oaiprovider source code:
Code Block language text git clone https://github.com/fcrepo4-labs/fcrepo4-oaiprovider.git cd fcrepo4-oaiprovider mvn package
Move the generated JAR to the Tomcat's lib folder:
Code Block language text cp target/fcrepo4-oaiprovider-4.0.0-beta-04-SNAPSHOT.jar <CATALINA_HOME>/webapps/<fcrepo>/WEB-INF/lib
Copy the oai.xml file to the fcrepo config directory:
Code Block cp fcrepo4-oaiprovider/src/main/resources/spring/oai.xml /<CATALINA_HOME>/webapps/<fcrepo>/WEB-INF/classes/spring/
Add the import to fcrepo's master.xml file:
- Edit <CATALINA_HOME>/webapps/<fcrepo>/WEB-INF/classes/spring/master.xml
- Add '<import resource="classpath:/spring/oai.xml"/>' after the other <import> declarations
- Make sure the OAI namespace is defined as a Compact Node Definition Type. Add: <oai = 'http://www.openarchives.org/OAI/2.0/'> to fcrepo-kernel-impl/src/main/resources/fedora-node-types.cnd in the main core and rebuiltrebuild the project, but you may have to find another way to add it. See Here
- Restart Tomcat. Go to http://localhost:8080/<fcrepo>/rest/oai?verb=Identify. If it all workedeverything is in order, you should see XML that defines outlining the default configuration for the OAI-PMH provider.
...