js

Thursday, March 6, 2025

Install pgAdmin in Ubuntu

 

✅ Install pgAdmin on Ubuntu

To install pgAdmin (a web-based GUI for PostgreSQL) on Ubuntu, follow these steps:


1. Update Package List

sudo apt update
sudo apt upgrade

2. Install Required Packages

sudo apt install curl ca-certificates gnupg

3. Add pgAdmin Repository

curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo tee /usr/share/keyrings/packages-pgadmin-org.gpg >/dev/null
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

4. Install pgAdmin

For the Web Version:

sudo apt install pgadmin4-web

OR
For the Desktop Version:

sudo apt install pgadmin4-desktop

5. Configure pgAdmin Web (Optional)

To configure the web-based pgAdmin:

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

Follow the instructions to set up:

  • Email
  • Password

6. Start pgAdmin

  • Web Version: Open your browser and go to:
http://localhost/pgadmin4
  • Desktop Version:
pgadmin4

đŸŽ¯ Uninstall pgAdmin

If you want to remove pgAdmin:

sudo apt remove pgadmin4
sudo apt autoremove

✅ Now pgAdmin is installed and ready to use!

No comments:

Post a Comment

Set password in postgreSQL

 The error is Unable to connect to server: connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: passw...