Quantcast
Viewing all articles
Browse latest Browse all 426

Installation

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.

Prerequisites

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 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. From a console execute the following commands:

sudo -u postgres /usr/lib/postgresql/9.1/bin/psql
postgres=# create role "DBUSER" with login password 'PASSWORD';
postgres=# create database "DBNAME" with owner "DBUSER" encoding 'UTF-8';

It is necessary to install PostGIS in the newly created database, now. To do so execute:

sudo su postgres
postgis$ psql -d "DBNAME" -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
postgis$ psql -d "DBNAME" -f /usr/share/postgresql/9.1/contrib/postgis_comments.sql
postgis$ psql -d "DBNAME" -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql
postgis$ psql -d "DBNAME" -c 'grant all on geometry_columns to "DBUSER";'
postgis$ psql -d "DBNAME" -c 'grant all on spatial_ref_sys to "DBUSER";'

Next you need to download and install GeoServer:

wget http://downloads.sourceforge.net/geoserver/geoserver-2.2-war.zip
sudo unzip geoserver-2.2-war.zip 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.

Cartaro Installation

It is strongly recommended to share the users of GeoServer and Drupal. Read about geoserver-sec-drupal before proceeding to learn how to prepare GeoServer accordingly.

Extract the distribution to a location of your choice within your web server 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.
Image may be NSFW.
Clik here to view.
Select Cartaro Installation Profile

After Drupal verified its permission you are asked for the database configuration.Image may be NSFW.
Clik here to view.
Cartaro Database Configuration

Make sure to prepare your database so that PostGIS is available prior to writing into the database. The availability of PostGIS is essential for that it provides the ability to store spatial data. PostgreSQL 8.4 and PostGIS 1.5 are recommended but more recent versions should work equally well.

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 you follow the suggestion to share users of Drupal and GeoServer.Image may be NSFW.
Clik here to view.
Configure GeoServer

Drupal users will be authenticated with GeoServer on login (this allows for protected layers and GeoServer administration from Drupal). Note that GeoServer needs to have access to the database of your Drupal installation to render the data entered in Drupal. GeoServer 2.2 is recommended but more recent versions should work as well.

Now, the installer will finally invite you to access your Cartaro.
Image may be NSFW.
Clik here to view.
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).
Image may be NSFW.
Clik here to view.
Cartaro Captials Demo


Viewing all articles
Browse latest Browse all 426

Trending Articles