Easiest way to install a PostgreSQL/PostGIS database on Mac

Installing Postgres+PostGIS has never been easier on Mac. In fact, it is now an app! You download the app-file from postgresapp.com, place it in your Applications folder, and you're done. Really.

If you think that was over too fast

If you think that was over too fast, there is one more thing you can do. Add the postgreapp "bin" directory to PATH.

vi ~/.bash_profile
 
# add line: export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.3/bin

Next time you open terminal you will be able to execute all of the following commands:

PostgreSQL:

clusterdb createdb createlang createuser dropdb droplang
dropuser ecpg initdb oid2name pg_archivecleanup 
pg_basebackup pg_config pg_controldata pg_ctl pg_dump 
pg_dumpall pg_receivexlog pg_resetxlog pg_restore 
pg_standby pg_test_fsync pg_test_timing pg_upgrade 
pgbench postgres postmaster psql reindexdb vacuumdb 
vacuumlo

PROJ.4:

cs2cs geod invgeod invproj nad2bin proj

GDAL:

gdal_contour gdal_grid gdal_rasterize gdal_translate 
gdaladdo gdalbuildvrt gdaldem gdalenhance gdalinfo 
gdallocationinfo gdalmanage gdalserver gdalsrsinfo 
gdaltindex gdaltransform gdalwarp nearblack ogr2ogr 
ogrinfo ogrtindex testepsg

PostGIS:

pgsql2shp raster2pgsql shp2pgsql

That is pretty f'ing awesome!!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.