Create a PostgreSQL Server Using AWS EC2
  • Introduction
  • AWS EC2: Launching Instance
    • Overview
    • Create Security Group
    • Create Launch Template
    • Option 1: Create Auto Scaling Group
    • Option 2: Create a Single Instance
    • Attach Elastic IP Address
  • Ubuntu 20.04: Configuring PostgreSQL
    • Overview
    • Install PostgreSQL
    • Add Role to PostgreSQL Server
    • Allow Remote Connection
  • Remote Server: Accessing Server on Local Computer
    • Overview
    • Connect with pgAdmin4
    • Connect with Python API
  • AWS EC2: Backup Server
    • Overview
    • Configuring Automatic Backups
  • Next Steps
Powered by GitBook
On this page
  • Update Ubuntu Machine
  • Install PostgreSQL

Was this helpful?

  1. Ubuntu 20.04: Configuring PostgreSQL

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.

PreviousOverviewNextAdd Role to PostgreSQL Server

Last updated 4 years ago

Was this helpful?