-
Install maven 3.6.3:
wget https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz \ && tar -xvf apache-maven-3.6.3-bin.tar.gz \ && mv apache-maven-3.6.3 /opt/ M2_HOME='/opt/apache-maven-3.6.3' PATH="$M2_HOME/bin:$PATH" export PATH
-
Install Java 8:
sudo apt-get install openjdk-8-jdk openjdk-8-jre
-
Install PostgreSQL 12 & PostGIS 3.0 :
sudo apt install postgresql-12 postgresql-12-postgis-3
-
Provide a password for default user (postgres)
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres';"
-
Log in as superuser
sudo su - postgres
-
Create the spatial database that will be used as a template:
createdb -E UTF8 -T template0 template_postgis
-
Create a PostGIS extention:
psql -d template_postgis -c "CREATE EXTENSION postgis"
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;"
psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;"
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;"
psql -d template_postgis -c "VACUUM FULL;"
psql -d template_postgis -c "VACUUM FREEZE;"
psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';"
psql -d postgres -c "UPDATE pg_database SET datallowconn='false' WHERE datname='template_postgis';"
createdb endpoint -T template_postgis
-
Clone the source code of Strabon from this repository.
-
Change to the directory that Strabon source code resides in:
cd Strabon
-
Build Strabon:
mvn clean pacakge
The default settings of Postgres are rather conservative. As a result, parameter tuning is neccessary for speeding up Postgres, therefore Strabon. If you are using Strabon to compare its performance against your implementation of stSPARQL/GeoSPARQL, you are strongly encouraged to contact us using the Strabon Users mailing list for assistance on tuning Postgres. You can follow the instructions below for tuning a Postgres server running on an Ubuntu machine that is dedicated to PostgreSQL and Strabon. ( The following settings work on Unix-based systems. Windows do not allow some of the options listed bellow)
-
Append the following text at the end of postgresql.conf, Uncomment the appropriate lines :
### RAM ## 4 GB of RAM #shared_buffers = 3GB #effective_cache_size = 3GB #maintenance_work_mem = 1GB #work_mem = 2GB ## 8 GB of RAM #shared_buffers = 5GB #effective_cache_size = 6GB #maintenance_work_mem = 2GB #work_mem = 5GB ## 16 GB of RAM #shared_buffers = 10GB #effective_cache_size = 14GB #maintenance_work_mem = 4GB #work_mem = 10GB ## 24 GB of RAM #shared_buffers = 16GB #effective_cache_size = 22GB #maintenance_work_mem = 6GB #work_mem = 15GB ## 48 GB of RAM #shared_buffers = 32GB #effective_cache_size = 46GB #maintenance_work_mem = 8GB #work_mem = 30GB ## 64 GB of RAM # contact us to find out! ### HD ## RAID with ordinary 7.200 disks #random_page_cost = 3.5 #3.0-3.5 ## High-End NAS/SAN #random_page_cost = 2 #1.5-2.5 ## Amazon EBS/Heroku #random_page_cost = 1.3 #1.1-2.0 ## SSD array #random_page_cost = 2.0 #1.5-2.5 ### Planner options # Increase the following values in order to avoid using the GEQO planner. # Small values (<8) reduce planning time but may produce inferior query plans # geqo_threshold = 15 # keep this value larger that the following two parameters from_collapse_limit = 14 join_collapse_limit = 14 ### Misc default_statistics_target = 10000 constraint_exclusion = on checkpoint_completion_target = 0.9 wal_buffers = 32MB ### Connections max_connections = 10
-
Append the following lines at the end of /etc/sysctl.conf, Uncomment the appropriate lines:
## 4 GB of RAM #kernel.shmmax = 3758096384 #kernel.shmall = 3758096384 #kernel.shmmni = 4096 ## 8 GB of RAM #kernel.shmmax = 5905580032 #kernel.shmall = 5905580032 #kernel.shmmni = 4096 ## 16 GB of RAM #kernel.shmmax = 11274289152 #kernel.shmall = 11274289152 #kernel.shmmni = 4096 ## 24 GB of RAM #kernel.shmmax = 17716740096 #kernel.shmall = 17716740096 #kernel.shmmni = 4096 ## 48 GB of RAM #kernel.shmmax = 35433480192 #kernel.shmall = 35433480192 #kernel.shmmni = 4224 ## 64 GB of RAM # contact us to find out!
-
Apply all changes by executing :
sudo sysctl -p sudo /etc/init.d/postgresql restart
-
Prepare for the next run by issuing the command, where db is the name of the Postgres database that Strabon will use:
sudo -u postgres psql -c 'VACUUM ANALYZE;' db
-
First download PostgreSQL database from here. (Version 12.13)
-
Then install the .exe file
-
When you will be asked for a password for the user postgres, enter postgres
-
For anything else, keep the defaults
-
Then, in the Stack builder select "PostgreSQL 12.13 on port 5432"
-
Then check the Spatial Extension PostGIS 3.0 for PostgreSQL 12.13
-
Then, in the PostGIS installation, check the option "Create spatial database"
-
Then enter the password for the user postgres (it must be postgres from the step 3)
-
Then for the Database Name enter "template_postgis"
-
Then press Yes, Close and Finish
-
Now you have PostgreSQL and PostGIS installed
-
Now open pgadmin IV (it was installed with postgreSQL)
-
Create a new database with the name "endpoint" and in the definition select as template the "template_postgis"
-
Install Tomcat compatible with Java 8 (eg. 9.0.68).
-
Add a new user in the tomcat-users.xml file. This file is usually located in the folder $TOMCAT_HOME/conf. Note that this user should be a member of the manager group. For example, add the following line inside a tomcat-users element to the file tomcat-users.conf and restart tomcat:
<user username="endpoint" password="endpoint" roles="manager-gui"/>
-
Create a directory where you want to place the sources of the Strabon on your machine, and
cd
into that directory, e.g.:mkdir Strabon cd Strabon
-
Clone the source code from this repository.
-
The source code of the endpoint is located at the folder Strabon of the source code tree that you just cloned, so
cd
into that directory, e.g.:cd Strabon
-
Edit the endpoint/WebContent/WEB-INF/connection.properties file and define the PostgreSQL host, the database name and the credentials that will be used by for storing stRDF metadata.
-
Compile the endpoint by calling:
mvn clean package
The result of this action is the creation of a .war file inside the target directory.
-
Deploy the endpoint by placing the .war file that was created inside the webapps folder of your Tomcat installation, e.g.:
sudo cp endpoint/target/strabon-endpoint-*.war /opt/tomcat/webapps/strabonendpoint.war
-
Start your Tomcat server, e.g.:
sudo systemctl start tomcat
-
Open a browser and go to localhost:/manager/html where is the port number you specified during Tomcat’s installation (the default port is 8080).