How to Install pgAdmin 4 PostgreSQL Admin Tool on Ubuntu 24.04

 

 

How to Install pgAdmin 4 PostgreSQL Admin Tool on Ubuntu 24.04

pgAdmin 4 is a popular open-source administration and development platform for PostgreSQL. This guide will walk you through the installation process on Ubuntu 24.04.

Prerequisites

  • Ubuntu 24.04 installed on your machine.
  • Access to a terminal with sudo privileges.

Step 1: Update Your System

Before installing any new software, it's a good idea to update your package list and upgrade your existing packages. Open your terminal and run:

sudo apt update && sudo apt upgrade -y
    

Step 2: Install Required Dependencies

pgAdmin 4 requires some additional packages. Install them by running:

sudo apt install wget curl ca-certificates gnupg -y
    

Step 3: Add the pgAdmin Repository

Next, you need to add the pgAdmin repository to your system. Run the following commands:

wget --quiet -O - https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/pgadmin.gpg
echo "deb [signed-by=/usr/share/keyrings/pgadmin.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/ubuntu focal pgadmin4 main" | sudo tee /etc/apt/sources.list.d/pgadmin4.list
    

Step 4: Install pgAdmin 4

Now that the repository is added, update your package list again and install pgAdmin 4:

sudo apt update
sudo apt install pgadmin4 -y
    

Step 5: Configure pgAdmin 4

After installation, you need to configure pgAdmin 4. Run the following command:

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

This script will prompt you to set up an email address and password for the pgAdmin web interface.

Step 6: Access pgAdmin 4

Once the setup is complete, you can access pgAdmin 4 by opening your web browser and navigating to:

http://localhost/pgadmin4
    

Conclusion

You have successfully installed pgAdmin 4 on Ubuntu 24.04. You can now use it to manage your PostgreSQL databases easily.

  • 0 Utilizadores acharam útil
Esta resposta foi útil?

Artigos Relacionados

Boost Your Ubuntu System's Performance with a Swap File: A Step-by-Step Guide

What is a Swap File? A swap file in Ubuntu serves as dedicated virtual memory on your hard...

How to Migrate ISPConfig 2, ISPConfig 3.x, Confixx, CPanel or Plesk to ISPConfig 3.2 (single server)

Introduction Migration from other control panels like ISPConfig 2, ISPConfig 3.x, Confixx,...

How to Install and Configure Zabbix Server and Client on Rocky Linux 9

Introduction Zabbix is an open-source monitoring solution that provides real-time...

How to Install CockroachDB Cluster on Debian 12

Introduction CockroachDB is a distributed SQL database built to handle large-scale,...

How to Install Joomla with Apache and Let's Encrypt SSL on AlmaLinux 9

Introduction Joomla is a popular open-source content management system (CMS) used to build...