How to Install pgAdmin on Debian 11 / Debian 10

pgAdmin is a free and open-source web-based tool for managing PostgreSQL databases, and it includes several features that can help you administer and maintain databases with ease.

With pgAdmin,  you can view and edit data in tables, run SQL queries, manage users and permissions, create sequences, etc., all from your web browser

pgAdmin is available for multiple operating systems such as Linux, Windows, and macOS.

Additionally, pgAdmin can also be run as a desktop application.

In this post, we will see how to install pgAdmin on Debian 11 / Debian 10.

Install PostgreSQL Server

First, install PostgreSQL server on your system if you haven’t already installed and above installed on your system.

READ:How To Install PostgreSQL on Debian 11 / Debian 10

Install pgAdmin on Debian 11

Add pgAdmin Repository

Update the repository index and then install a few essential packages.

sudo apt update sudo apt install -y apt-transport-https ca-certificates software-properties-common curl

First, import the pgAdmin signing key to the system.

# Debian 11 curl -fsSL https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/pgadmin-keyring.gpg # Debian 10 curl -fsSL https://www.pgadmin.org/static/packages_pgadmin_org.pub -O- | sudo apt-key add -

Next, add the pgAdmin repository to your system using the below command.

# Debian 11 echo "deb [signed-by=/usr/share/keyrings/pgadmin-keyring.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bullseye pgadmin4 main" | sudo tee /etc/apt/sources.list.d/pgadmin4.list # Debian 10 echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/buster pgadmin4 main" | sudo tee /etc/apt/sources.list.d/pgadmin4.list

Install pgAdmin 4

Once you have added the repository, run the following command to update the repository index.

sudo apt update

Install pgAdmin 4 web application with the following command.

sudo apt install -y pgadmin4-web 

Setup pgAdmin 4

You will need to do set up pgAdmin 4 before accessing it. So, initiate the pgAdmin 4 set up with the below command.

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

To complete the setup, you will need to answer few questions. So, answer as per your requirement.

<

pre>Setting up pgAdmin 4 in web mode on a Debian based platform… Creating configuration database… NOTE: Configuring authentication for SERVER mode. Enter the email address and password to use for the initial pgAdmin user account: Email address: admin@itzgeek.local Password: xxx Retype password: xxx pgAdmin 4 – Application Initialisation ====================================== Creating storage and log directories… We can now configure the Apache Web server for you. This involves enabling the wsgi module and configuring the pgAdmin 4 application to mount at /pgadmin4. Do you wish to continue (y/n)? y
Sumber: disini

Wagiman Wiryosukiro

Petani Sistem Informasi, tukang las plugin & themes Wordpress. Co-Founder SistemInformasi.biz. Saat ini aktif sebagai Developer & kontributor di OpenMandriva Linux.

You may also like...

%d bloggers like this: