francois / asdf-postgis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

asdf-postgis

PostGIS plugin for asdf version manager

Dependencies

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.

  1. You will need a compiler.
  • Mac
    1. gcc
    2. 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
  2. sudo apt-get install libreadline-dev

Install

asdf plugin-add postgis https://github.com/francois/asdf-postgis.git

ASDF options

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 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

About


Languages

Language:Shell 100.0%