-
Notifications
You must be signed in to change notification settings - Fork 0
Setup PostgreSQL
You can setup a valid PostgreSQL environment including PostGIS by following the two steps:
-
Visit the PostgreSQL website and download the current version. (e.g. 9.3)
-
Visit the PostGIS website and download the current version. (e.g. 2.1)
If you are running a Debian system, we recommend installing a precompiled version. In that case, please follow the official instructions to do so. As soon as you registered the postgres related APT pgdg repository, you can run the following command:
# apt-get install postgresql-server-dev-9.3 postgresql-9.3-postgis-2.1
If you are running a Windows system and you are asked to whether or not insall plugins, during the installation process; feel free to install the delivered PostGIS plugin. It may not be the newest version, but it will suffice.
-
To import the database, you need to first create a database:
$ createdb spatial_election --encoding UNICODE --template=template0 $ psql spatial_election > CREATE EXTENSION postgis; > CREATE EXTENSION postgis_topology; > \q
-
Then you need to restore the database dump file to your database. You need to dowmload the spatial_db.backup file.
pg_restore -d spatial_election spatial_db.backup
-
Create a role with password according to your hibernate.cfg.xml