Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install PostGIS on macOS
  1. install postgis
    $ brew install postgis
  2. start PostgreSQL service
    $ brew services start postgres
    stop PostgreSQL service
    $ brew services stop postgres
  3. create superuser
    $ createuser --superuser "$(echo $USER)"
    $ createdb "$(echo $USER)"
  4. install PostGIS extension in PostgreSQL
    1. login to postgresql commandline mode
      $ psql
    2. create postgis extension
      =# CREATE EXTENSION postgis;
    3. check postgis extension version
      =# \dx
      and you'll probably see a line as below:
      postgis  | 2.3.2   | public     | PostGIS geometry, geography, and raster spatial types and functions

That's all. Enjoy coding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.