For someone new to database servers and their dependencies, what is the easiest assured way of installing PostGIS on a machine with no other software beyond what comes with its operating system? I'd like to know for Ubuntu, Windows and if possible a common Linux method. I'm understanding that you need to install PostGreSQL first, but before that perhaps you need to install Apache Server, and I'm not sure if that has dependencies.

Perhaps there a single binary that loads EVERYTHING for Windows, and maybe there a single program from the Ubuntu GIS repositories that installs everything. If not, what's the install order?

  • 1
    Postgis doesn't need for Apache. – Pablo Apr 19 '13 at 18:58

I have found for windows users using the Enterprise Postgres Installers with StackBuilder the easiest way to get up and running from a clean install (no previous versions of database etc.)

The PostgreSQL installers include the database server, pgAdmin and StackBuilder.

Notes: **Internet Connection is required during the install as downloads items based on users input.

Versions 9.0, 9.1 and 9.2 below have been updated to incorporate the security patches released on Thursday, April 4th, 2013.

Download from:


Installation Guide available:


| improve this answer | |

For Ubuntu

sudo apt_get install postgresql postgis postgresql-9.1-postgis

sudo -i -u postgres
createdb postgis
psql -d postgis -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
psql -d postgis -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql
psql -d postgis -f /usr/share/postgresql/9.1/contrib/postgis_comments.sql
| improve this answer | |
  • Is CREATE EXTENSION postgis only for PostGis 2.0? – djq Apr 21 '13 at 19:22
  • Nop. CREATE EXTENSION, is for PostgreSQL 9.x :) – Taber Apr 22 '13 at 16:21

The easiest way (at least in Windows):

You can use, use EnterpriseDB installer (windows & linux), once you had installed PostgreSQL, use "StackBuilder" utility to install PostGIS optional library (PostGIS recommends this method in his web site)

Then you need to install pgAdminIII to connect to PostgreSQL.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.