PostGIS plugin for asdf version manager
This requires brew if you're on a mac, or a debian flavored linux. If you need it to work on something else, you'll likely need to modify the plugin. 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 for the asdf plugin.
- You will need a compiler.
- Mac
gcc
- Hit the ok button and it will install. If it already has it, then you are good.
- Ubuntu
sudo apt-get install linux-headers-$(uname -r) build-essential
- On Ubuntu, you will need libreadline
sudo apt-get install libreadline-dev
asdf plugin-add postgis https://github.com/francois/asdf-postgis.git
Check 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 optionsPOSTGIS_EXTRA_CONFIGURE_OPTIONS
- append these configure options along with ones that this plugin already uses
- Create your .tool-versions file in the project that needs PostGIS and add
postgis 2.3.2
or whatever version that you want. - run
asdf install
- Connect to your DB:
psql default
(or whatever name you gave your DB) CREATE EXTENSION postgis;
- Just
DROP EXTENSION postgis