Project

General

Profile

Strabon instr » History » Version 1

Version 1/3 - Next » - Current version
Giorgos Giannopoulos, 10/08/2013 01:44 PM


Strabon instr

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

Download version 3.2.3 as an archive directly from the mercurial repository, save it at ~/packages and unpack at Strabon-331163be0682/:

# wget http://hg.strabon.di.uoa.gr/Strabon/archive/331163be0682.tar.gz -O ~/packages/strabon.tar.gz
# cd ~/packages
# tar xzvf strabon.tar.gz

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 APT repositories:

# apt-get install postgresql-8.4 postgis postgresql-8.4-postgis

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/8.4/contrib/postgis-1.5/postgis.sql
# sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/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 ~/packages/Strabon-331163be0682/
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 ~/packages/Strabon-331163be0682/endpoint/target/strabon-endpoint-3.2.3.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.