Geospatial CMS



This tutorial will guide you through the initial steps to get up and running with Cartaro. Because Cartaro is based on several open source components, we need to make sure all requirements are met. This guide is based on Ubuntu Precise (12.04 LTS). You might need to adapt commands depending on your Linux distribution.

If you find the installation too complicated for a first sight at Cartaro then you should try Cartaro on the OSGeo Live DVD or use the Docker container for Cartaro.


PostGIS 1.5 or later are supported by Cartaro's PostGIS module. Apache and PHP requirements are set by Drupal and Tomcat requirements are set by GeoServer.

First we install Apache, PHP, PostGIS, Tomcat and some additional libraries using the following command:

sudo apt-get install unzip apache2 php5 php5-gd php5-curl php5-pgsql postgresql-9.1 postgis postgresql-9.1-postgis postgresql-contrib-9.1 tomcat7

Now we are ready to create a PostGIS database where Drupal will be installed and GeoServer will fetch spatial data from. Take a note of database name, user name and password for the Drupal user we are going to create. Replace DBUSER with the name of the user that you want to provide to Drupal and DBNAME with the name of the database that you want to use to store data entered in Cartaro. Afterwards it is necessary to install PostGIS in the newly created database. For PostGIS 1.5 execute the following commands:

sudo su postgres
createuser --pwprompt --no-superuser --no-createdb --no-createrole DBUSER
createdb --encoding=UTF-8 --owner=DBUSER DBNAME
psql -d "DBNAME" -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
psql -d "DBNAME" -f /usr/share/postgresql/9.1/contrib/postgis_comments.sql
psql -d "DBNAME" -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql
psql -d "DBNAME" -c 'grant all on geometry_columns to "DBUSER";'
psql -d "DBNAME" -c 'grant all on spatial_ref_sys to "DBUSER";'

PostGIS 2.0 users should also grant access to geography_columns and raster_columns.

Next you need to download and install GeoServer. Versions 2.2.x and 2.3.x has been tested with Cartaro:

sudo unzip geoserver.war -d /var/lib/tomcat7/webapps/

GeoServer contains a default admin account with username "root" and a random password. Either use this account when installing Cartaro, or adapt the account to match your Drupal admin account. By default GeoServer will be available at http://[host]:8080/geoserver.

Remember to set the JVM startup parameter ENABLE_JSONP=true for GeoServer version 2.2.5 and above. Please consult the documentation of your servlet container for instructions. Users of Tomcat 7 on Ubuntu want to append to JAVA_OPTS in /etc/default/tomcat7. Note that despite stated in GeoServer's documentation, only the JVM startup parameter will work for all GeoServer versions.


It is also necessary to adapt the session timeout of GeoServer to Drupal. Edit geoserver/WEB-INF/web.xml or [Tomcat]/conf/web.xml and set the following session-config block inside the web-app block. After the Java application server that is running GeoServer is restarted, everything is ready to install Cartaro.


The GeoServer module will authenticate Drupal users in GeoServer even without web access to it. For GeoServer versions under 2.4.1, additional configuration is necessary. The webLogin Filter Authentication Chain should allow the creation of an HTTP session for storing cookies. To configure this behaviour, in Security → Authentication → Filter Chains click on webLogin and check Allow creation of an HTTP session for storing the authentication token. Be sure to click on save to maintain the new settings in Security → Authentication page.


Cartaro Installation

Download and extract the distribution to a location of your choice within your web server (e.g. /var/www/) and proceed with the installation in the same way you'd install a plain Drupal as described in the installation guide or just follow the steps outlined below.

Point your browser to the extracted Cartaro download within your webserver to launch the graphical installer.

Select Cartaro Installation Profile

After Drupal verified its permission you are asked for the database configuration.

Cartaro Database Configuration

During the installation you are asked to specify an existent GeoServer instance. Ensure that your Drupal credentials match up with the credentials for GeoServer or follow the documentation to share users of Drupal and GeoServer.

Configure GeoServer

Now, the installer will finally invite you to access your Cartaro.

Cartaro is installed

If you opted to install demo data your Cartaro will have some capital cities predefined (content type Capital with title and coordinates).

Cartaro Captials Demo

« Back to Documentation index