- install postgis
$ brew install postgis
- start PostgreSQL service
stop PostgreSQL service
$ brew services start postgres
$ brew services stop postgres
- create superuser
$ createuser --superuser "$(echo $USER)" $ createdb "$(echo $USER)"
- install PostGIS extension in PostgreSQL
- login to postgresql commandline mode
$ psql
- create postgis extension
=# CREATE EXTENSION postgis;
- check postgis extension version
and you'll probably see a line as below:
=# \dx
postgis | 2.3.2 | public | PostGIS geometry, geography, and raster spatial types and functions
- login to postgresql commandline mode
That's all. Enjoy coding.