Version 6 (modified by pbaumann, 21 months ago) (diff)


rasdaman quick installation guide for Debian 8

Tested on and updated for Debian Jessie 64bit (Debian GNU/Linux 8) with:

  • rasdaman 9.1
  • Java 7 (openjdk) and Tomcat 7
  • postgreSQL 9.4

This is a quick guide to install rasdaman on a Debian-type Linux system; it has been tested on Debian Jessie 8.1. 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)
  2. Install core required packages:
    sudo apt-get install make automake autotools-dev libtool m4 gawk bison flex git-core g++ libncurses5-dev \
                         libtiff-dev libgdal1-dev gdal-bin libnetpbm10-dev libjpeg-dev libpng-dev libffi-dev \
                         postgresql postgresql-contrib libedit-dev libecpg-dev libsqlite-dev sqlite3 \
                         python-dateutil python-lxml python-pip python-gdal libboost-all-dev
    sudo pip install glob2
  3. Install web services component (petascope) required packages (could be replaced by version 6 of both if needed):
    sudo apt-get install openjdk-7-jdk tomcat7
  4. 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
  5. Add super user in postgres (same name as the local user)
    sudo -u postgres createuser -s rasdaman
  6. To prevent "java.lang.OutOfMemoryError?: Java heap space error" in the SECORE resolver (java servlet), set a proper maximum heap space for tomcat (>=512MB). Usually this can be done by setting -Xmx1024m in JAVA_OPTS in /etc/default/tomcat7 and then restarting tomcat with service tomcat7 restart

rasdaman setup

  1. Log in to the target system as user rasdaman
    su - rasdaman
  2. 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.4/bin
  3. Get and compile rasdaman, configured to sit locally (!) in ~rasdaman/install
    # but first make sure java and javac are installed and using the same version:
    java -version
    javac -version
    • 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)
      git clone git://
      cd rasdaman
      autoreconf -fi
      ./configure --prefix=$RMANHOME --with-wardir=$CATALINA_HOME/webapps/ --with-netcdf
  4. Install it
    mkdir $RMANHOME
    make install
  5. 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)
  6. 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
  7. Start the rasdaman server
  8. Insert demo data localhost 7001 $RMANHOME/share/rasdaman/examples/images/ rasadmin rasadmin
  9. Check if demo data has been inserted
    rasql -q 'select c from RAS_COLLECTIONNAMES as c' --out string
  10. If you want a deep checking of the installation, you can run the systemtests
    cd systemtests
    make check

Next steps

Once rasdaman is installed and running, you can optionally setup petascope, the rasdaman geo services suite (see installation guide).

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/