Project

General

Profile

Strabon Instructions

The following instructions are known to work with Strabon-3.2.9 on a debian/wheezy platform.

Download version 3.2.9 as an archive directly and unpack at say at ~/workspace/Strabon-3.2.9/.

Install java-related (jdk, maven, tomcat) prerequisites from APT repositories:

# apt-get install openjdk-6-jdk openjdk-6-jre maven2 tomcat6

Install postgres-related prerequisites from postgresql APT repositories. Note that if you install from debian's APT repositories you'll end-up with postgresql 9.1 (and postgis 1.5), so you will probably need to update your APT sources at /etc/apt/sources.list (for further instructions on this, please follow the detailed instructions from https://wiki.postgresql.org/wiki/Apt).

# apt-get install postgresql-9.3 postgresql-9.3-postgis-2.1 postgresql-9.3-postgis-2.1-scripts

Setup a postgis-enabled database template:

# sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres';" 
# sudo -u postgres createdb -E UTF8 -T template0 template_postgis
# sudo -u postgres createlang -d  template_postgis plpgsql
# sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.3/contrib/postgis-2.1/postgis.sql
# sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.3/contrib/postgis-2.1/spatial_ref_sys.sql
# sudo -u postgres psql -d template_postgis -c "VACUUM FULL;" 
# sudo -u postgres psql -d template_postgis -c "VACUUM FREEZE;" 
# sudo -u postgres psql -d postgres -c  "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis'" 
# sudo -u postgres psql -d postgres -c  "UPDATE pg_database SET datallowconn='false' WHERE datname='template_postgis'" 

Create a new database "endpoint" based on the former template:

# sudo -u postgres createdb endpoint -T template_postgis

Now, navigate to Strabon source directory and build with maven (may take some time):

cd ~/workspace/Strabon-3.2.9/
mvn clean package

If the build process is successfull, it will produce (among others) a webapp archive (WAR) file to be deployed under Tomcat servlet container. So, copy it into the expected webapp directory, and restart Tomcat service:

cp ./endpoint/target/strabon-endpoint-3.2.9.war /var/lib/tomcat6/webapps/strabon-endpoint.war
/etc/init.d/tomcat6 restart

Point your browser at http://localhost:8080/strabon-endpoint/ and verify that the webapp has been deployed successfully.