Install PostgreSQL

Install PostgreSQL onto your Ubuntu instance

In this section, we will be walk through setting up PostgreSQL on your Ubuntu instance.

Update Ubuntu Machine

Before we install PostgreSQL into our instance, we must first update and upgrade our packages in the instance.

sudo apt-get update -y && sudo apt-get upgrade -y

The -y is a Linux flag that means to response "Yes" to any questions or prompts that appear in these commands.

Install PostgreSQL

To install PostgreSQL, type the following line of code:

sudo apt install postgresql -y

That's it! PostgreSQL is now installed onto your machine. When you installed PostgreSQL, you also created a "postgres" user account.

Last updated