ART-DECOR installation on linux
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. |
Contents
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
The part will install the eXist-db database. First download the ART-DECOR eXist-db installer .jar from: http://sourceforge.net/projects/artdecor/files/eXist-db/
Place eXist-db-setup-2.1-rev0000.jar in /opt/art-decor-linux/tooling/packages
Start the installation:
cd /opt/art-decor-linux/tooling/scripts
# run the installation script:
sudo ./install_exist.sh
Output will be similar to the following:
Starting exist-db installer. Press enter if settings are correct!
Select target path [/usr/local/exist_atp_21_20141216]
press 1 to continue, 2 to quit, 3 to redisplay
1
Set Data Directory
Please select a directory where eXist-db will keep its data files. On Windows, this should be outside the 'Program Files' directory. Please make sure eXist can write to the directory it is installed in.
Data dir: [webapp/WEB-INF/data]
press 1 to continue, 2 to quit, 3 to redisplay
1
Set Admin Password and Configure Memory
Enter password: []
<password>
Enter password: []
<password>
------------------------------------------
press 1 to continue, 2 to quit, 3 to redisplay
1
[ Starting to unpack ]
[ Processing package: Core (1/6) ]
[ Processing package: Sources (2/6) ]
[ Processing package: Apps (3/6) ]
[ Processing package: shared (4/6) ]
[ Processing package: dashboard (5/6) ]
[ Processing package: eXide (6/6) ]
[ Unpacking finished ]
[ Starting processing ]
Starting process Setting admin password ... (1/1)
--- Starting embedded database instance ---
Dec 16, 2014 10:11:13 PM org.expath.pkg.repo.util.Logger info
INFO: Create a new repository with storage: File system storage in /usr/local/exist_atp_21_20141216/webapp/WEB-INF/data/expathrepo
Setting admin user password...
--- Initialization complete. Shutdown embedded database instance ---
[ Console installation done ]
Note: The installation script installs eXist-db to: /usr/local/exist_atp_21_<date>
The installation script creates a symlink at /usr/local/exist_atp pointing to the actual installation path. TODO: memory settings and starting eXist-db