Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 1.58 KB

File metadata and controls

53 lines (33 loc) · 1.58 KB

PostgreSQL Client Installation Guide

This guide provides step-by-step instructions on how to install the PostgreSQL 17 client on your system using the official PostgreSQL APT repository. Follow these steps to ensure a successful installation.

Prerequisites

  • A machine running Ubuntu or a Debian-based Linux distribution.
  • Access to a terminal and permission to execute sudo commands.

Installation Steps

1. Update the APT Package Index

First, update your APT package index to make sure you have the latest list of available packages:

sudo apt update

2. Add the Official PostgreSQL APT Repository

Add the PostgreSQL official APT repository to your system to ensure you get the latest versions of PostgreSQL packages:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

3. Update the APT Package Index Again

After adding the new repository, update your APT package index again to include the newly available PostgreSQL packages:

sudo apt update

4. Install PostgreSQL 17 Client

Now, install the PostgreSQL 17 client package:

sudo apt install postgresql-client-17

5. Verify the Installation

After the installation is complete, verify that the PostgreSQL client has been installed correctly by checking its version:

psql --version

You should see the version of the PostgreSQL client displayed, confirming that the installation was successful.