ART-DECOR installation on linux

Revision as of 21:32, 16 December 2014 by Mligtvoet (talk | contribs) (first setup of page)
Tools.svg This article or section is in the middle of an expansion or major restructuring and is not yet ready for use. You are welcome to assist in its construction by editing it as well.

Introduction

This page contains a complete installation manual for ART-DECOR in production environments. This setup has been tested on CentOS 64 bits servers. It uses the somewhat older eXist-db 2.1 installer which will be updated in Q1 2015. It assumes you already have a user with sudo permissions. The installation process will assume you are are running scripts as a normal user (unless otherwise explicitly noted). It assumes you use yum as package installation manager. This script assumes you want to install:

  • the ART-DECOR installation script into: /opt/art-decor-linux/tooling
  • Apache tomcat at: /usr/share/tomcat
  • eXist-db at: /usr/local/exist_atp

Note: this installation page now downloads the trunk/developer version of installation scripts. This will be changed to stable when slightly more mature.

Download installation scripts

Here we setup a structure for installation scripts and packages, and then download the ART-DECOR installation scripts.

# setup the directory structure
sudo mkdir /opt/art-decor-linux;
cd /opt/art-decor-linux
sudo mkdir tooling
sudo mkdir tooling/packages
sudo mkdir tooling/packages_archives
sudo mkdir tooling/scripts_archives
sudo chown -R root:wheel /opt/art-decor-linux/
cd /opt/art-decor-linux/tooling
# get installation scripts from svn
sudo yum install svn
sudo svn checkout svn://svn.code.sf.net/p/artdecor/code-0/trunk/utilities/art_decor_installers/art-decor-linux/tooling/scripts scripts

This action should have downloaded the following files: (in /opt/art-decor-linux/tooling/scripts)

  • settings: a configuration file to store setting: java location and location for installation scripts
  • install_tomcat.sh: Tomcat installation script
  • install_exist.sh: eXist-db installer helper script

Install Sun java JDK

We want to use Sun/Oracle java JDK. First place the JDK rpm in /opt/art-decor-linux/tooling/packages

Visit: http://www.oracle.com/technetwork/java/javase/downloads/index.html

Download a JDK version, for instance: jdk-7u71-linux-x64.rpm (or a later version). One way to get the rpm to the server is to first download it to your desktop and then place it on the server with scp/winscp.

# Check the current version of java
java -version

Output might look somewhat like (this is the OpenJDK default version we don't want to use):

java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.11.90) (rhel-1.62.1.11.11.90.el6_4-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

Start the java installation:

# sudo to a root shell
sudo su -l root
mkdir /usr/java; cd /usr/java
# install sun jdk (next to default installed openJDK)
chmod +x /opt/art-decor-linux/tooling/packages/jdk-7u*.rpm
rpm -Uvh /opt/art-decor-linux/tooling/packages/jdk-7u*.rpm
# check which version java the systeem now uses:
java -version

Output should look somewhat like:

java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Check the java installation:

# if java -version does still report the OpenJDK version update java alternatives:
alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000

# Check where java is installed?
ls /usr/java/

Output should look somewhat like:

default  jdk1.7.0_71  latest

Change the java version in scripts/settings

# exit the root shell
exit
# Change the java version in scripts/settings
cd /opt/art-decor-linux/tooling/scripts; sudo vi settings

In settings change the line with java_location to your current version: Example:

# set your java version here
# for centos
java_location=/usr/java/jdk1.7.0_71

Exit vi and save the file with: <esc> :wq

Amount of memory for your server

Install eXist-db from installer

eXist-db postinstall configuration

Nginx installation

Apache Tomcat installation