Talk:PostGIS/Installation

From OpenStreetMap Wiki
Jump to: navigation, search

Complete Installation for Ubuntu

Please note that the latest version of osm2pgsql from svn (0.80.0) can not work if you install intarray. So the following rows should be skipped:

# for Ubuntu <=9.10:
  psql -d gis -f /usr/share/postgresql/8.3/contrib/_int.sql

# for Ubuntu >=10.04:
  psql -d gis -f /usr/share/postgresql/8.4/contrib/_int.sql

Database login

Instead of

local   all         all                               ident

the line

local   all         all                               peer

is found in the configuration postgresql 9.6. Should that also get changed to trust? According to https://www.postgresql.org/docs/9.6/static/auth-pg-hba-conf.html the answer is probably yes.

Database reload

The command

sudo -u postgres /usr/lib/postgresql/9.6/bin/pg_ctl reload

on Ubuntu 17.04 results in the error

pg_ctl: no database directory specified and environment variable PGDATA unset
Try "pg_ctl --help" for more information.

To restart/reload the postgresql service use:

sudo service postgresql restart