WellGeo RegRep Installation Instructions

WARNING: THIS PAGE IS OBSOLETE AND SUPERCEDED BY WELLGEO REGREP INSTALLATION MANUAL

Installation ProcessThe following is a summary of the installation process for WellGEO RegRep. Additional details may be found for each steps in a separate section related to the step.

  1. Install a supported OS if needed
  2. Install postgresql server 8.2.5 if needed
  3. Create database for omar-server (the WellGEO server)
  4. Install JDK 6 if needed
  5. Install Web Container if needed
  6. Setup environment
  7. Deploy server war file to web container
  8. Deploy welgeo-ui-swing to web container

Install a supported OS if needed

  1. Supported OS currently include the following:
    1. RedHat Enterprise Linux 5.1
    2. CentOS 5.1
    3. Ubuntu 7.10
  2. Check version of OS following instruction here
  3. If a supported OS is not detected then install or upgrade to a supported OS

Install PostgreSQL Server

  • Check if postgresql-server 8.3 or above is installed by using following command:
    psql --version
  • If needed, install following packages using OS specific installer: postgresql-server
    Application / Add Remove Software / Servers / PostgreSQL Database
  • Start postgresql service:

    #GUI command on RedHat
    System / Administration / Service / postgresql start

    #Command line on RedHat
    service start postgresql

  • Next setup client authentication for postgresql. The simplest is to setup trust authentication as follows:
  1. Make sure server has been started at least once as that creates the PGDATA tree at /var/lib/pgsql/data
  2. Edit the client authentication control file pg_hba.conf using:
    sudo gedit /var/lib/pgsql/data/pg_hba.conf #On Ubuntu: /etc/postgresql/8.2/main/pg_hba.conf
  3. Replace its contents with following content:
    # "local" is for Unix domain socket connections only
    local all all trust

    # IPv4 local connections:
    host all all 127.0.0.1/32 trust

    # IPv6 local connections:
    host all all ::1/128 trust
  4. Save the file
  5. Restart the postgres server using:
    sudo /etc/init.d/postgresql* restart

Create Database

#Create omar4 database:
sudo su postgres -c "createdb -E UTF-8 omar4"

#Add PL/pgSQL extension:
sudo su postgres -c "createlang plpgsql omar4"

Install PostGIS

Install JDK

#Install JDK after downloading JDK 6 from:
http://java.sun.com/javase/downloads/index.jsp

cd /opt
. jdk-*.bin

Install Tomcat

#download tomcat if needed
wget http://mirror.olnevhost.net/pub/apache/tomcat/tomcat-6/v6.0.18/src/apach...

#Extract tomcat archive
cd /opt
tar -zxvf apache-tomcat-6.0.18-src.tar.gz

Setup Environment

#Add following environment varaiable to your shell:
JAVA_HOME to point to root directory of JDK installation
CATALINA_HOME to point to root directory of tomcat installation
JAVA_OPTIONS to define any JVM parameters

Here is a suggested setting for JAVA_OPTIONS:
JAVA_OPTIONS="-Xms200m -Xmx1500m  -XX:+CMSClassUnloadingEnabled  -XX:PermSize=1024m -XX:MaxPermSize=512m"

#Also include following proxy information to JAVA_OPTIONS if you are behind a firewall:
-Dhttp.proxyHost=<hostname or ip address> -Dhttp.proxyPort=<port>

Deploy Test LDAP Server

This step is only needed if you currently do not have a LDAP server for managing your users. This steps quickly provides an LDAP server that may be used for test purposes.

#Download spring-secuirty ldap sample war
wget http://repo2.maven.org/maven2/org/springframework/security/spring-securi...

mkdir $CATALINA_HOME/webapps/spring-security-samples-ldap-2.0.3
cd $CATALINA_HOME/webapps/spring-security-samples-ldap-2.0.3
jar -xvf <somepath>/spring-security-samples-ldap-2.0.3.war

Deploy Server WAR

#Copy war file to webapps dir
cp ~/wellgeo-regrep/omar-server-4.0.war $CATALINA_HOME/webapps

#Place any deploy specific ebRIM files into the ${user.home}/wellgeo/databaseLoader directory. Create it if needed and make sure it is readable by the server. The ebRIM files may be any where under the directory tree and MUST have a name that matches pattern '*rim.xml'. These files will be loaded into server every time the server boot. A sample file may be found here:
http://www.wellfleetsoftware.com/files/WellfleetFederationConfig-rim.xml

#start the server
$CATALINA_HOME/bin/startup.sh

#Watch log if you wish until server starts
tail -f $CATALINA_HOME/logs/catalina.out

Optimize Database

This step MUST be run after server has been started:

sudo su postgres -c "psql -d omar4 -f $CATALINA_HOME/webapps/omar-server-<release>/WEB-INF/lib/classes/"

Deploy UI for Java Webstart

#unzip jnlp zip file in proper place

mkdir -p $CATALINA_HOME/webapps/ROOT/wellgeo-ui-swing/4.0/jnlp
pushd $CATALINA_HOME/webapps/ROOT/wellgeo-ui-swing/4.0/jnlp
unzip ~/wellgeo-regrep/wellgeo-ui-swing-4.0.zip
popd

#Adjust jnlp file for deployment
gedit $CATALINA_HOME/webapps/ROOT/wellgeo-ui-swing/4.0/jnlp/wellgeo-ui-swing.jnlp

#Change the server address in codebase line to your server's address

#Add the following kind of line to configure one or more registry urls.
#This must be within the resources section:

<property name="registry-urls" value="http://127.0.0.1:8080/omar-server-4.0"/>

Save the file.

#Run ui via Java Webstart
javaws http://<server>:8080/wellgeo-ui-swing/4.0/jnlp/wellgeo-ui-swing.jnlp

#Makes ure UI starts without any errors.
#Errors are likely due to copy paste errors in editing jnlp file.