Skip to content
This repository has been archived by the owner on Jun 8, 2020. It is now read-only.

Installation

ksnabb edited this page Jun 13, 2012 · 1 revision

This page includes the current installation instructions of how to set up the environment and get a the geonition applications running.

This instruction is tested on Debian 6.0

Dependencies

This instruction was done with the following software packages. We have not tested compatibility with older versions and this information should be checked from each package site separately.

  • PostgreSQL 9.1.4
  • PostGIS 1.5.4 (PostGIS 2.0 does not yet work with Django 1.4)
  • Django 1.4

Installing dependencies

Often I choose to install packages from source code so below you will see a mix of apt-get and source code installations methods.

GCC, make, readline, zlib, bzip2, g++, libxml2, python-setuptools, python-dev, python-imaging

On Debian run the following command to install the critical dependencies to get PostgreSQL compiled.


apt-get install gcc make libreadline-dev zlib1g-dev bzip2 g++ libxml2-dev python-setuptools python-dev python-imaging

PostgreSQL

Installing PostgreSQL is usually very straight forward. Just run the following command in order. For special configuration options read the PostgreSQL installation instructions.


> wget http://ftp.postgresql.org/pub/source/v9.1.4/postgresql-9.1.4.tar.gz
> tar -xzf postgresql-9.1.4.tar.gz
> cd postgresql-9.1.4
> ./configure
> make
> make install
> adduser postgres
> mkdir /usr/local/pgsql/data
> chown postgres /usr/local/pgsql/data
> su - postgres
> /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
> /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
> /usr/local/pgsql/bin/createdb test
> /usr/local/pgsql/bin/psql test
> exit

Proj.4

The projection library is used by e.g. PostGIS.


> wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz
> tar -xvzfg proj-4.8.0.tar.gz
> cd proj-4.8.0
> ./configure
> make
> make install

GEOS


> wget http://download.osgeo.org/geos/geos-3.3.4.tar.bz2
> tar -xvf geos-3.3.4.tar.bz2
> cd geos-3.3.4
> ./configure
> make
> make install
> ldconfig

PostGIS

Depending on the postgres installation you have you do not necessarily use the absolute paths to the commands.


> wget http://postgis.refractions.net/download/postgis-1.5.4.tar.gz
> tar -xvzf postgis-1.5.4.tar.gz
> cd postgis-1.5.4
> ./configure --with-pgconfig=/usr/local/pgsql/bin/pg_config
> make
> make install
> su - postgres
> /usr/local/pgsql/bin/createdb template_postgis
> /usr/local/pgsql/bin/createlang plpgsql template_postgis
> /usr/local/pgsql/bin/psql -d template_postgis -f /usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql
> /usr/local/pgsql/bin/psql -d template_postgis -f /usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql
> /usr/local/pgsql/bin/psql -d template_postgis -f /usr/local/pgsql/share/contrib/postgis-1.5/spatial_ref_sys.sql

Now you have installed PostGIS and the next step is to start installing the Geonition Django applications.

Geonition releases

To install the application you only need to download the latest releases tag and do some configurations to get started.


> wget https://github.com/geonition/releases/tarball/14
> tar -xvzf 14
> cd geonition-releases-8d9c641
> sh install_all.sh


If psycopg2 installation throws and error that pg_config not found run the following command and try again.


> export PATH=/usr/local/pgsql/bin:$PATH