How to add PostGIS to PostgreSQL

PostGIS is a great extension if you want to work with geographical data in PostgreSQL. Installation of PostgreSQL extension is really easy. Just run this SQL command:
CREATE EXTENSION postgis;

Create postgis extension in pgAdmin3
If you see the error like in the picture above, that means you have not installed postgis package. Just install it with command (Fedora 23 solution):
$ sudo dnf install postgis postgis-utils postgis-docs


And then repeat sql command:
CREATE EXTENSION postgis;

PostgreSQL: PostGIS extension