| 752 | .. _homebrew: |
| 753 | |
| 754 | Homebrew (PostGIS option) |
| 755 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 756 | |
| 757 | Homebrew provides "recipes" for building binaries and packages from source. It |
| 758 | can be used to get the dependencies needed to use PostgreSQL and PostGIS. |
| 759 | |
| 760 | :: |
| 761 | |
| 762 | $ brew install postgresql |
| 763 | $ brew install postgis |
| 764 | $ brew install gdal |
| 765 | |
| 766 | This does ``not`` provide the ```template_postgis``` template database used in |
| 767 | the tutorial. The following commands show how that template can be created, |
| 768 | assuming you're running postgresql locally. You should adjust the commands as |
| 769 | needed to account for non-local postgres, a different database user, or other |
| 770 | details. Also, you may need to adjust the SQL paths based on the version of |
| 771 | postgres you installed with homebrew. |
| 772 | |
| 773 | :: |
| 774 | |
| 775 | $ createdb -h localhost template_postgis |
| 776 | $ psql -h localhost -d template_postgis -f /usr/local/Cellar/postgresql/ \ |
| 777 | 9.1.2/share/postgresql/contrib/postgis-1.5/postgis.sql |
| 778 | $ psql -h localhost -d template_postgis -f /usr/local/Cellar/postgresql/ \ |
| 779 | 9.1.2/share/postgresql/contrib/postgis-1.5/spatial_ref_sys.sql |
| 780 | |