Install PostgreSql and PostGIS On Ubuntu Server
There is an article for installing PostgreSQL on Ubuntu.  actually is a even better one if you want to install PostgreSQL and PostGIS at the same time.
In order to use PostGIS in database, you need to execute two commands below in every database that you want to have PostGIS extension.
-- Enable PostGIS (includes raster) CREATE EXTENSION postgis; -- Enable Topology CREATE EXTENSION postgis_topology;