Getting Started
If you are running PostgreSQL as a service from a cloud provider (not installing it yourself) then you probably already have PostGIS installed, and you just need to enable it in your database. Connect to your database as the postgres
user or another super-user account, and run:
CREATE EXTENSION postgis;
Congratulations! PostGIS is now enabled.
You can find out what version you have, with postgis_full_version().
SELECT PostGIS_Full_Version();
You can also check to see what alternate PostGIS versions might be installed.
SELECT * FROM pg_available_extensions WHERE name = 'postgis';
Start with the PostGIS Workshop for a hands-on guide to using spatial SQL for spatial data management and analysis.
If you are running your own system, and want to install PostGIS (and PostgreSQL) directly on it yourself, here are some basic instructions.