SPMS Installation: Development

Installation Overview
Standard Installation
Development Installation
Stand-Alone Installation

This document is intended to ease the installation of a development instance Oracle and the SPMS. For "Development" we mean:

  • a stand-alone SPMS not connected to the JACoW central repository
  • (initial) data created by importing an existing database instead of synchronizing with the repository.

Prerequisites

Linux installation

A generic Centos 5.5 will be fine.

Oracle installation

If you are lucky you can count on an existing Oracle infrastructure. If not, follow these lines.

For easy development, Oracle (and the SPMS) can be installed on a virtual machine. A good virtual machine software--multiplatform and free--is VirtualBox.

Database

Weather or not you will use a virtual machine, the installation instructions for Oracle are pretty much the same. A good, step-by-step tutorial can be found at the Toolbox.com site.

SPMS can work from Oracle 9i up. However, it is almost impossible to use a version of imp (Oracle tool for data import) older than the version of exp used for exporting. So, getting the latest version of Oracle (and, hence, of imp is suggested.

Application Server

Please note that this tutorial helps you with the installation of the Oracle database only. To get the SPMS, you also need the Oracle application server. The Oracle application server is a modified version of Apache together with the mod_plsql module. In other words, it's a gateway between HTTP and PL/SQL stored procedures in Oracle.

Setting up Oracle application server is another hard task. For the development, another easier solution exists: mod_owa.

mod_owa is an open source implementation of mod_plsql, also developed by Oracle.

The page above instructs on how to install and configure mod_owa. In short, install Apache + mod_ssl, then download the tar.gz, copy the mod_owa.so in the "modules" directory of Apache, copy the modowa.conf and change it with the correct parameters (in particular, OwaUserid and <Location > -- equivalent to the DAD) and restart Apache.

Notes: there are a couple of minor hitches with configuring mod_owa:

  1. libclntsh.so not found by the module. I created symbolic links to /usr/local/lib/libclntsh.so, /usr/local/lib/libclntsh.so.10.1 and /usr/local/lib/libclntsh.so.11.1 in /usr/local/lib/, confidured /etc/ld.so.conf.d/ in order to include that path and re-run ldconfig.
  2. The Oracle SID could not be correctly set by the above OwaUserid string in modowa.conf if the database and the application server are on the same machine.
    Solution: modify the Apache startup script /etc/init.d/httpd changing the line httpd=${HTTPD-/usr/sbin/httpd} according the following:

    ENV="ORACLE_HOME=/u01/app/oracle/product/11.2.0/<dbhome> ORACLE_UNQNAME=<name of the DB> ORACLE_SID=<name of the DB>" (use your correct settings)
    httpd="${ENV} ${HTTPD-/usr/sbin/httpd}"

    Now restart Apache.

SPMS setup

Follow the standard conference installations up to step 4.

Then, import the data given you by an RSC administrator.

After importing, a couple of scripts must be run.

Let's suppose all the SPMS source code is stored in a directory /path/to/somewhere/src/ and the scripts Attach:Set_Params and Attach:SPMS_After_Import are in /path/to/somewhere/ (before proceeding, change their name to include the .sql extension, becoming Set_Params.sql and SPMS_After_Import.sql). Use the following two commands to "initialize" the imported DB and do a little bit of housekeeping.

   # cd /path/to/somewhere/src/
   # sqlplus user/pass@aliasdb @SPMS_After_Import.sql

If using other directories/operating systems, please modify the source accordingly.

Conclusions

If everything went ok, now point your browser to https://your-server-name/Location (Location is the ~DAD defined in modowa.conf), and your SPMS will greet you.