https://github.com/itsthatguy/asdf-postgis
https://github.com/itsthatguy/asdf-postgis
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/itsthatguy/asdf-postgis
- Owner: itsthatguy
- Created: 2020-03-12T15:54:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-12T16:49:48.000Z (over 6 years ago)
- Last Synced: 2025-03-06T05:42:51.969Z (over 1 year ago)
- Language: Shell
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# asdf-postgis
PostGIS plugin for [asdf](https://github.com/asdf-vm/asdf) version manager
## Dependencies
According to PostGIS installation page, you will need GEOS, Proj.4, GDAL, LibXML2 and JSON-C.
Finally, you will need a working installation of PostgreSQL. See [asdf-postgres](https://github.com/smashedtoatoms/asdf-postgres) for the asdf plugin.
1. You will need a compiler.
* Mac
1. ```gcc```
1. Hit the ok button and it will install. If it already has it, then you are good.
* Ubuntu
1. ```sudo apt-get install linux-headers-$(uname -r) build-essential```
1. On Ubuntu, you will need libreadline
1. ```sudo apt-get install libreadline-dev```
## Install
```
asdf plugin-add postgis https://github.com/francois/asdf-postgis.git
```
## ASDF options
Check [asdf](https://github.com/asdf-vm/asdf) readme for instructions on how to install & manage versions of Postgres.
When installing PostGIS using `asdf install`, you can pass custom configure options with the following env vars:
* `POSTGIS_CONFIGURE_OPTIONS` - use only your configure options
* `POSTGIS_EXTRA_CONFIGURE_OPTIONS` - append these configure options along with ones that this plugin already uses
# How to use (easier version)
## Install
1. Create your .tool-versions file in the project that needs PostGIS and add `postgis 2.3.2` or whatever version that you want.
2. run `asdf install`
## Install in your DB
1. Connect to your DB: `psql default` (or whatever name you gave your DB)
2. `CREATE EXTENSION postgis;`
## Stop
1. Just `DROP EXTENSION postgis`
## Credits
- original repository/code from https://github.com/francois/asdf-postgis