Environement setup for Windows

Before install and launch Gisgraphy, you must setup java, postgres, and postgis. It is not, properly speaking, the installation of Gisgraphy, and if you already have Postgresql, Postgis and java installed (you needs JVM >= 1.5), you can go directly to the gisgraphy installation guide

Install Java

You can find a good tutorial on this page : https://www.java.com/en/download/help/download_options.xml

Install postgresql and postgis

Install postgresql

If you already have Postgresql installed, you can skip this section.

This section will guide you step by step to install Postgresql on Windows.

Before installing Postgresql we have to download it from the dedicated PostgreSQL page. Once done, you've have to extract files by double clicking on the downloaded file. You will have the following list of files :

To start the installation of PostgreSQL, double click on 'SETUP.bat' or 'postgresql-X.Y.msi'

Exit all Windows programs before installation and click "Next":

You'll have to choose your language and click "Start". On the next screen, read the installation notes if you want (not necessary ;) ) and click "Next":

The next screen detailled the installation options and module. Let the default options and click "Next"

On Windows, Posgresql is seen as a service. so it need a user account on the machine. The default user created is named 'postgres'. Enter the password twice and click "Next". The password you give will not be the password of the PostgreSQL user 'postgres'.

Now you have to choose the password for the the PostgreSQL user 'postgres'. it is the database user with all rights. For this reason you have to remember the password because you'll need it to log in and create the database and tables.
It is strongly recommended to put an other password than the windows account one. choose 'mdppostgres' if you want to use the default password defined in Gisgraphy.
Click on "Accept connections on all adresses, not just localhost" (recommended, but not necessary if you will only use postgreSQL on the computer) choose your locale and choose 'UTF-8' for encoding (server)!! click "next".

A message will prompt. It tells you that, due to the fact that you've checked Accept connections on all adresses, not just localhost" : the server will be reachable from other computers.

Some procedural languages can be installed now or later, by default 'PL/pgsql' is checked. that mean that it will be installed.
Keep the 'PL/pgsql' checked (it will be used by Postgis) and click "Next".

Now you have to choose the contrib modules. Keep 'Adminpack' and 'Debugger' and click "Next".

That's all we need, PostgreSQL is ready to be installed. Click "Next".

You can see the installation progress.

Here we are.PostgreSQL is installed !
Subscribe to pgsql-announce if you want to be informed of update and bug corrections.
Keep 'launch stack builder on exit' checked and click on "finish"

Install postgis

We will guide you in the installation of PostGIS.

Select your database server and click on "Next"

Check 'postgis X.Y.Z' and click "Next".

Select a connection to download PostGIS and click "Next"

Keep The default destination folder where the installation files will be downloaded.

We need to download the PostGIS installation files, click "Next" : the files will be downloaded.

Then every thing is ready to launch the postgis install.click "Next" to begin the installation

Read the license and click 'I Agree' if it is the case ;)

Unchecked 'create spatial database' (we don't need) and click "Next"

keep the default destination folder "C:\Program Files\PostgreSQL\X.Y\" and click "Next"

We need to enter the postgresql user password to initialize PostGIS (not the computer account one), keep the default port, and click "Next".

PostGIS will be installed :

Now postgis is installed ! Click on "Close" :

If you see this screen, that mean that you've install postres and postgis

Tips : Install PGAdmin. It will be more user friendly than command line.

In order to know if Postgis is correctly install, open a PostgreSQL connection (start/Programs/'PostgreSQL X.Y'/'psql to postgres') or PgAdmin and type :
  • select version (); or SHOW server_version;. It will give you the PostgreSQL version
  • select postgis_full_version () ; It will give you the Postgis version

Create the database

Here are the command to create the Gisgraphy database

Important : You have to deconnect all the users from the Template_postgis database if you want to create the gisgraphy database from the Template_postgis

# create the database
psql -U YOURUSER  -h YOURIP -c  "CREATE DATABASE gisgraphy WITH TEMPLATE = Template_postgis ENCODING = 'UTF8';"

And now...

Now that you environement is setup, you can go to the Gisgraphy installation guide