Installation

Preamble

This document relates to the installation of Constellation-SDI Version 1.1.0 or above.


Pre-requites

  • Install Oracle JDK, version 7u45 or above. Download
  • Install PostgreSQL, version 9.1 or above. Download
  • Install Tomcat7, version 7.0.47 or above. Download

Choose only one of the following “from binary” or “from source code” installation procedures:

Installation from binary archive (standard installation)

  • Download application

The application can be downloaded from the following link: Constellation-SDI-1.2.1


  • Create constellation database

Create a PostgreSQL connection role with cstl loging and admin password:

sql> CREATE USER cstl WITH ENCRYPTED PASSWORD 'admin';

Create a database named constellation using UTF-8 encoding. That database owner shall be the above-cited cstl user:

sql> CREATE DATABASE constellation OWNER cstl ENCODING 'UTF8';


  • Deploy on Tomcat server

See the deployment section in following page: Deployment


Installation from source code (developer installation)

  • Additional pre-requites

  • Checkout source code from Github

Constellation-SDI source code is available on GitHub at the following link: https://github.com/geomatys/constellation

Execute the following command from a terminal in order to checkout the source code:

$> git clone https://github.com/Geomatys/constellation.git
$> git checkout 1.1.0


  • Install database server

Create a PostgreSQL connection role with cstl role and admin password

sql> CREATE USER cstl WITH ENCRYPTED PASSWORD 'admin';

Create two databases named constellation and cstl-test. Those databases owner shall be the above cstl user:

sql> CREATE DATABASE constellation OWNER cstl ENCODING 'UTF8';
sql> CREATE DATABASE cstl-test OWNER cstl ENCODING 'UTF8';


  • Build

Verify that Java and Maven are reachable on the path:

$> java -version
$> mvn -version

Output of above commands shall comply with the pre-requites listed in previous sections. If the version differ, check environment variables.


Build the project by executing the following command from the root of constellation-sdi project:

$> mvn install

For a faster build, one can skip the tests:

$> mvn install -DskipTests


Deploy Constellation-SDI in Tomcat

  • Tomcat configuration

Create a setenv.sh file in the Tomcat bin directory with the following content:

CATALINA_OPTS="$CATALINA_OPTS -Dfile.encoding=UTF8 -Xmx1024m
-XX:MaxPermSize=128m -Dgeotk.image.cache.size=128m
-XX:-HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./constellation.hprof"
JAVA_HOME=<PATH_TO_JDK>
JRE_HOME=<PATH_TO_JDK>/jre


Replace <PATH_TO_JDK> with path to the JDK home directory.


  • Constellation-SDI deployment

The web application is contained in the constellation.war file in the constellation/modules/cstl-sdi/target/ directory.

Copy constellation.war in the Tomcat webapps directory.

Launch the Tomcat server by running the following command from a terminal:

<PATH_TO_TOMCAT>/bin/startup.sh

View the logging messages:

tail -f <PATH_TO_TOMCAT>/logs/catalina.out

After the Tomcat server has been launch, the constellation-sdi application is accessible at the http://localhost:8080/constellation URL.
The connection loggin and password are:

  • login : admin
  • password : admin

To shutdown the application, one can use the following command:

<PATH_TO_TOMCAT>/bin/shutdown.sh