Version 53 (modified by pbaumann, 2 years ago) (diff)


rasdaman quick installation guide for Debian

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 in step 2.

  1. Log in to the target system as user 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-6-openjdk/
    export JRE_HOME=$JAVA_HOME/jre
    export CATALINA_HOME=/var/lib/tomcat6
    export PATH=$PATH:$RMANHOME/bin:/usr/lib/postgresql/8.4/bin
  1. Install required packages:
    sudo apt-get install make automake autotools-dev bison flex git-core g++ comerr-dev libecpg-dev libtiff4-dev libgdal1-dev \
                         gawk libncurses5-dev libnetpbm10-dev libffi-dev libreadline-dev libtool m4 postgresql \ 
                         openjdk-6-jdk tomcat6 libsigsegv-dev libedit-dev gdal-bin ant
    On CentOS and similar
    sudo yum install git bison libtiff-devel hdf-devel libjpeg-devel readline-devel libsigsegv-devel libpng-devel netpbm-devel \
                     openssl-devel flex postgresql-devel doxygen netcdf-devel gdal-devel java-1.6.0-openjdk-devel make automake \
                     postgresql-server tomcat6

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

sudo update-alternatives --set awk /usr/bin/gawk
  1. Get and compile rasdaman, configured to sit locally (!) in ~rasdaman/install
    git clone git://
    cd rasdaman
    autoreconf -fi
    ./configure --prefix=$RMANHOME --with-wardir=$CATALINA_HOME/webapps/
  1. Install it
    mkdir ../install
    make install
  1. Add super user in postgres (same name as the local user)
    sudo -u postgres createuser -s rasdaman -P
  2. 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
  3. Start the rasdaman server
  4. Insert demo data localhost 7001 $RMANHOME/share/rasdaman/examples/images/ rasadmin rasadmin
  5. Check if demo data has been inserted
    rasql -q 'select c from RAS_COLLECTIONNAMES as c' --out string

Alternative PostgreSQL database location

Move the database

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/