Installing PostGIS

~10 min read

Installing PostGIS

PostGIS is a spatial extension for PostgreSQL. Here's how to get it running:

On Ubuntu/Debian

bash
sudo apt update
sudo apt install postgresql postgis

On macOS (Homebrew)

bash
brew install postgis

Verify Installation

Connect to your database and run:

sql
CREATE EXTENSION postgis;
SELECT PostGIS_Version();

You should see the version number returned. You're ready to go!