Member-only story

Tutorial

Install PostgreSQL 12 + PostGIS on Ubuntu 20.4 in 5 mins.

A Comprehensive Guide

Joe T. Santhanavanich

--

Photo by Caspar Camille Rubin on Unsplash

This article is a very short tutorial for installing PostgreSQL 12/ PostGIS on the Ubuntu system. It is a production note which I initially wrote for myself to install PostgreSQL on several machines. The explanation is kept very short and straight to the result.

Step 1: Add and Install PostgreSQL 12 via your terminal.

$ sudo apt update
$ sudo apt install postgresql-12 postgresql-client-12

Step 2: Test PostgreSQL + Assign password to PostgreSQL

$ systemctl status postgresql.service

Then, connect and change the “postgres” password.

$ sudo -u postgres psql
$ \password postgres
enter strong password twice!

Step 3: Install GnuPG 2.0 and PostGIS

$ sudo sudo apt install gnupg2
$ sudo apt install postgis postgresql-12-postgis-3

Step 4: Set the Client Authentication &…

--

--

No responses yet