Install postgresql and pgAdmin4 on Ubuntu 20.04

PgSQl

Install Postgresql

sudo apt install postgresql postgresql-client

sudo su - postgres
psql

ALTER USER postgres PASSWORD 'postgres';
ALTER SYSTEM SET listen_addresses TO '*';
exit
exit

Install PgAdmin4

If Curl Command not Install run
sudo apt install curl

curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add

sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

sudo apt install pgadmin4

sudo /usr/pgadmin4/bin/setup-we.sh

Related posts

How to Install ISPConfig with Nginx Web Server on Ubuntu 24.04

Understanding Linux File Systems A Comprehensive Guide

20 Linux Administration Tips and Tricks to Help You Excel in a DevOps Career