Version 25 (modified by pbaumann, 22 months ago) (diff)


rasdaman quick installation guide for Debian 7

Tested on and updated for Debian Wheeze 64bit (Debian GNU/Linux 7) with:

  • rasdaman 9.0 beta
  • Java 7 (openjdk) and Tomcat 7
  • postgreSQL 9.1

This is a quick guide to install rasdaman on a Debian-type Linux system; it has been tested on Debian Squeeze. It assumes having a Linux user rasdaman under which all installation will be done. Target installation directory is ~rasdaman/install, but this can be changed by adapting $RMANHOME

Administrative configuration

  1. Log into your system as administrator (or sudoer)
  1. Install core required packages:
    sudo apt-get install make automake autotools-dev libtool m4 gawk bison flex git-core g++ libncurses5-dev \
                         libtiff4-dev libgdal1-dev gdal-bin libnetpbm10-dev libjpeg-dev libpng-dev libffi-dev \
                         postgresql postgresql-contrib libedit-dev libecpg-dev libsqlite-dev

2a. Configure alternatives for awk to gawk (Ubuntu 12.04)

sudo update-alternatives --set awk /usr/bin/gawk
  1. Install web services component (petascope) required packages (might be replaced by version 6 of both if needed):
    sudo apt-get install openjdk-7-jdk tomcat7
  1. Ensure postgreSQL is installed and configured (see also sections below for custom configuration):
  • NOTE: (to be checked) postgis2.0 is required for MultiPoint coverage type support and latest available version on debian7 is 1.5.3-2, hence manual upgrade is required (outside scope for this guide, postgis package is still there in case it gets updated on Debian repositories)
    sudo apt-get install postgresql-9.1 postgresql-9.1-postgis
  1. Allow rasdaman user to deploy to tomcat7
    sudo adduser rasdaman tomcat7
  • NOTE: if you also choose a RMANHOME outside the rasdaman user home you have to create it and change its ownership to the rasdaman user to aviod requiring admin privileges for the user
  1. Add super user in postgres (same name as the local user)
    sudo -u postgres createuser -s rasdaman -P
  1. To prevent "java.lang.OutOfMemoryError?: Java heap space error" in the SECORE resolver (java servlet), consider setting a proper maximum heap space for tomcat (>=512MB). Usually this can be done by setting -Xmx512m in JAVA_OPTS in /etc/default/tomcat7

rasdaman setup

  1. Log in to the target system as user rasdaman
    #If already logged in, to get an updated groups membership shell use:
    su - rasdaman
  1. Choose your installation directory (here: /home/rasdaman/install) and further settings (you may want to put these into ~rasdaman/.bashrc for automatic loading upon login; don't forget to reload it first time through source ~rasdaman/.bashrc)
    export RMANHOME=/home/rasdaman/install
    export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
    export JRE_HOME=$JAVA_HOME/jre
    export CATALINA_HOME=/var/lib/tomcat7
    export PATH=$PATH:$RMANHOME/bin:/usr/lib/postgresql/9.1/bin
  1. Get and compile rasdaman, configured to sit locally (!) in ~rasdaman/install
  • Note: the --with-netcdf option is required for advanced testing (see below, you can skip it for a minimal setup and if you don't need that format)
        #Before running "make", make sure java and javac are using the same version:
        java -version
        javac -version
git clone git://rasdaman/rasdaman.git
cd rasdaman
autoreconf -fi
./configure --prefix=$RMANHOME --with-wardir=$CATALINA_HOME/webapps/ --with-netcdf
  1. Install it
    mkdir $RMANHOME
    make install
  1. Set your rasdaman user as metadata user in petascope configuration (if you want to use OGC services via petascope component)
  • NOTE: This is a quick hack to avoid more complex postgreSQL configuration to keep distinct login credentials (which is outside the scope of this guide)
     vim $RMANHOME/etc/
     # edit it as follows:
     # metadata_user=rasdaman
     # metadata_pass=***** #(password set in admin step 6)
  1. Setup the rasdaman database. Important: By default postgresql keeps the database in /var/lib/postgresql, so at this step you may want to move it to another place. #if you want to use OGC services via petascope component
  1. Start the rasdaman server
  1. Insert demo data localhost 7001 $RMANHOME/share/rasdaman/examples/images/ rasadmin rasadmin
  1. Check if demo data has been inserted
    rasql -q 'select c from RAS_COLLECTIONNAMES as c' --out string
  1. If you want a deep checking of the installation, you can run the systemtests
    cd systemtests
    make check

Alternative PostgreSQL database location

Move the database (untested yet)

By default postgresql keeps the database in /var/lib/postgresql/8.4/main/, to move it to another place (let's say /data/pgdata) follow the steps below.

  1. Stop postgresql
    service postgresql stop
  2. Create new directory for the postgres database\
    mkdir -p /data/pgdata
    chown postgres: /data/pgdata
  3. Edit postgres configuration file and change the 'data_directory' to point to /data/pgdata
    editor /etc/postgresql/8.4/main/postgresql.conf
    3.1. Option 1: initialize new data dir
    sudo -u postgres /usr/lib/postgresql/8.4/bin/initdb -D /data/pgdata
    3.2. Option 2: move your old directory to the new place
    mv /var/lib/postgresql/8.4/main/* /data/pgdata
  4. Link to ssl certificates
    ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem /data/pgdata/server.crt
    ln -s /etc/ssl/private/ssl-cert-snakeoil.key /data/pgdata/server.key
    4.1 Or alternatively set ssl = false in postgresql.conf
  1. Start postgresql
    service postgresql start

Use a tablespace

Alternatively we can use a tablespace, and create RASBASE in that tablespace.

  1. Create new directory for the new tablespace:
    mkdir -p /data/pgdata
    chown postgres: /data/pgdata
  2. Create a rasdaman tablespace in postgres:
    sudo -u postgres psql -d postgres
    CREATE TABLESPACE rasdaman LOCATION '/data/pgdata';
  3. Patch the rasdaman script to use create the database in the new tablespace:
    sed -i 's/createdb $DATABASE_NAME/createdb $DATABASE_NAME -D rasdaman/' $RMANHOME/bin/