Installing Database
This guide explains how to install PostgreSQL 15.4 on Linux using the PostgreSQL APT repository.
Update and Install Prerequisites
Open your terminal and run the following command to update your system packages and install necessary dependencies.
Add PostgreSQL APT Repository
Import the PostgreSQL GPG key
Add the PostgreSQL repository to your system:
Install PostgreSQL 15.4
Update the package list again to include the PostgreSQL repository
Install PostgreSQL 15.4
Start and Enable PostgreSQL Service
Start the PostgreSQL service
Enable PostgreSQL to start on boot
Verify the service status
Configure PostgreSQL
Change postgres password in
/etc/postgresql/15/main/pg_hba.conf
Restart the PostgreSQL service after making changes
Last updated