From 0e862e3630bdcd2c3f947d0d31cbf62ec2d726ce Mon Sep 17 00:00:00 2001 From: chStaiger Date: Wed, 18 Jul 2018 16:41:20 +0200 Subject: [PATCH 1/2] Add instructions for CentOS 7 --- 02-install-jOAI.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/02-install-jOAI.md b/02-install-jOAI.md index 58a9091..3c5024b 100644 --- a/02-install-jOAI.md +++ b/02-install-jOAI.md @@ -199,3 +199,68 @@ This page can also be accessed through the menus, following **Data Provider**, a After this installation, anyone can access all ionformation on the server. To restrict access to sensitive data, such as harvesting information, follow the instructions on [this page](https://uc.dls.ucar.edu/joai/docs/configuring_joai.jsp#accessControl). This is optional and not required for this tutorial. However we strongly recommend to restrict access on a production system . +## Centos Install +Here we briefly desctribe how to set up an OAI server on a centos machine. + +### 1. Set hostname and firewall +```sh +sudo hostnamectl set-hostname b2find +sudo iptables -A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT +sudo iptables -A INPUT -p tcp -m tcp --dport 8181 -j ACCEPT +``` +Make sure there is no `-A INPUT -j DROP` before the upper two lines. You can delete and add the 'DROP' like this: +```sh +sudo iptables -L --line-numbers +sudo iptables -D INPUT +sudo iptables -A INPUT -j DROP +``` +Finally save the firewall configuration: +```sh +sudo service iptables save +``` + +### 2. Install Java dependencies and Tomcat +```sh +sudo yum install jre +sudo yum install tomcat +sudo yum install tomcat-webapps tomcat-admin-webapps +``` +Start Tomcat: +```sh +sudo systemctl -l restart tomcat +``` +To check whether Tomcat runs open a webbrowser and go to `http://:8080`. You should see the Tomcat welcome page. + +### 3. Redirect Tomcat to port 8181 +To avoid clashes with the CKAN server which we will install later redirect Tomcat to port 8181. +``` +sudo cp /etc/tomcat/server.xml /etc/tomcat/server.xml_orig +sudo vi /etc/tomcat/server.xml +``` +And edit + +```sh + + +``` +Finally restart Tomcat and check landing page with new port: +``` +sudo service tomcat restart +``` + +### Install JOAI +``` +sudo yum install unzip +wget https://sourceforge.net/projects/dlsciences/files/jOAI%20-%20OAI%20Provider_Harvester/v3.1.1.4/joai_v3.1.1.4.zip +unzip joai_v3.1.1.4.zip +sudo cp joai_v3.1.1.4/oai.war /var/lib/tomcat/webapps/ +sudo service tomcat restart +``` +Now go to `http://:8080/oai` and check whether you find the OAI-PMH server landing page. + + + + From 4e0c3cff28c9ef54e4d657fe86d47726976144fc Mon Sep 17 00:00:00 2001 From: chStaiger Date: Wed, 18 Jul 2018 16:46:47 +0200 Subject: [PATCH 2/2] Update 02-install-jOAI.md --- 02-install-jOAI.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/02-install-jOAI.md b/02-install-jOAI.md index 3c5024b..22793bf 100644 --- a/02-install-jOAI.md +++ b/02-install-jOAI.md @@ -246,7 +246,7 @@ And edit URIEncoding="UTF-8" redirectPort="8443" /> ``` -Finally restart Tomcat and check landing page with new port: +Finally restart Tomcat and check landing page with the new port: ``` sudo service tomcat restart ``` @@ -259,7 +259,7 @@ unzip joai_v3.1.1.4.zip sudo cp joai_v3.1.1.4/oai.war /var/lib/tomcat/webapps/ sudo service tomcat restart ``` -Now go to `http://:8080/oai` and check whether you find the OAI-PMH server landing page. +Now go to `http://:8181/oai` and check whether you find the OAI-PMH server landing page.