Linux

How to install Pgadmin on Linux

Pgadmin is an open-source administration and development tool for PostgreSQL, the open database software. This tool is essential for those who work heavily with PostgreSQL. Here’s how to install the app on Linux.

Pgadmin on Linux

How to install Pgadmin on Ubuntu

PGAdmin is available for Ubuntu users via an Apt software repository. To start the installation, you’ll first need to open up a terminal window. To open up a terminal window on the Ubuntu desktop, press the Ctrl + Alt + T on the keyboard. Or, search for “Terminal” in the app menu and launch it that way.

When the terminal window is open, use the apt install command to install the “Curl” program. This program will need to be installed to grab the Pgadmin key. 

sudo apt install curl

Once the Curl app is installed, use it on Ubuntu to download the Pgadmin public key for the repository. This key is required to interact with installations in the repo. 

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

Now that the key is added to your Ubuntu system, you will need to add the Pgadmin repository line to your software sources. The easiest way to do this is with the command below. It will automatically write the repo to a file so you can use it on Ubuntu with ease.

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"

You’ll need to update your system to finish setting up the repo.

sudo apt update

Once the repo is set up on your Ubuntu system, the installation of Pgadmin can begin. Using the apt install command below, install the software. 

For all Pgadmin software, execute the following command:

sudo apt install pgadmin4

If you need the Desktop version of the application to Ubuntu, install the “pgadmin4-desktop” package onto your computer with the command below.

sudo apt install pgadmin4-desktop

Lastly, if you only need the web version of Pgadmin on your Ubuntu system, use the command below to install the “pgadmin4-web” package using the command below.

sudo apt install pgadmin4-web

How to install Pgadmin on Debian

The Pgadmin website has an Ubuntu logo, followed by the word “apt” in the download section. However, it isn’t just for Ubuntu, but every Linux OS that uses Apt as a package manager. For this reason, we know it will work on Debian.

To get Pgadmin working on your Debian PC, you’ll first need to open up a terminal window. To do that, press Ctrl + Alt + T on the keyboard. Or, search for “Terminal” in the app menu.

With the terminal window open, use the apt-get install command to install the Curl tool. This tool is required to download the Pgadmin repo key.

sudo apt-get install curl

Next, you must download the Pgadmin repository key to Debian. This key makes it possible to use the Pgadmin repo, so do not skip this step.

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

You’ll now need to use the sudo sh command below to write out the Pgadmin repository to your Debian system. 

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'

Run the update command to refresh Debian’s software sources. To do that, use the apt-get update command.

sudo apt-get update

How to install Pgadmin on Arch Linux

Pgadmin isn’t officially supported on the Pgadmin website download page. However, Arch Linux officially packages this program in the Arch Linux repos, and users can install it and get updates regularly, just like any other Linux OS.

To start the installation, open up a terminal window on the Arch Linux desktop. When the terminal window is open, use the pacman command below to install Pgadmin on your system.

sudo pacman -S pgadmin

How to install Pgadmin on Fedora

Pgadmin3 is available in the Fedora Linux official software repos. However, this release is outdated, and while it works well, the official website has Pgadmin4 for Fedora and other RPM-based distributions. 

To start the installation process, you must add the official repo to Fedora. To do that, download the official repo RPM using the command below.

sudo rpm -i https://ftp.postgresql.org/pub/pgadmin/pgadmin4/yum/pgadmin4-fedora-repo-2-1.noarch.rpm

When the package is installed, you’ll be able to install the Pgadmin program onto Fedora. 

For the desktop mode for Fedora, install the “pgadmin4” package using the dnf command below.

sudo dnf install pgadmin4-desktop

For the web version of Pgadmin, install the “pgadmin4-web” package. 

How to install Pgadmin on OpenSUSE

The latest release of Pgadmin (version 4) is available for installation in the OpenSUSE repos. To get it working, you can simply enter the following zypper install command down below.

sudo zypper install pgadmin4

You’ll have set up both the web and desktop mode on OpenSUSE Linux by installing the package above.

Похожие статьи

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Кнопка «Наверх»