Skip to content

Instantly share code, notes, and snippets.

@dezhin
Created July 20, 2020 22:20
Show Gist options
  • Save dezhin/2dc74274a068e2fe3f46282c30b21a8d to your computer and use it in GitHub Desktop.
Save dezhin/2dc74274a068e2fe3f46282c30b21a8d to your computer and use it in GitHub Desktop.
PostgeSQL + PostGIS installation for NextGIS Web
# apt install postgresql postgresql-contrib postgis
# su postgres
$ cd
$ createuser --pwprompt nextgisweb
Enter password for new role: [type database password here]
Enter it again: [type database password here again]
$ createdb --owner=nextgisweb nextgisweb
$ psql nextgisweb -c "CREATE EXTENSION postgis"
$ psql nextgisweb -c "ALTER TABLE spatial_ref_sys OWNER TO nextgisweb"
$ psql nextgisweb -c "ALTER TABLE geography_columns OWNER TO nextgisweb"
$ psql nextgisweb -c "ALTER TABLE geometry_columns OWNER TO nextgisweb"
$ psql nextgisweb -c "ALTER TABLE raster_columns OWNER TO nextgisweb"
$ psql nextgisweb -c "ALTER TABLE raster_overviews OWNER TO nextgisweb"
$ psql nextgisweb -c "CREATE EXTENSION hstore"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment