How To Install pgAdmin 4 on AlmaLinux 8

Install pgAdmin 4 on AlmaLinux 8

In this tutorial, we will show you how to install pgAdmin 4 on AlmaLinux 8. For those of you who didn’t know, pgAdmin is the leading open-source feature-rich PostgreSQL administration and development platform that runs on Linux, Unix, Mac OS X, and Windows. It provides all the features you need to manage your PostgreSQL databases from a web UI. PgAdmin 4 replaces PgAdmin III which was developed in the C++ language and supports PostgreSQL 9.2 and later releases. If you are not a fan of managing databases on the PostgreSQL shell, then PgAdmin4 is the go-to management tool.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the pgAdmin 4 open source administration and development platform for PostgreSQL on AlmaLinux 8. You can follow the same instructions for Rocky Linux.

Install pgAdmin 4 on AlmaLinux 8

Step 1. First, let’s start by ensuring your system is up-to-date.

sudo dnf update
sudo dnf install epel-release
sudo yum-config-manager --disable pgdg-common

Step 2. Installing pgAdmin 4 on AlmaLinux 8.

Now we add the PgAdmin 4 repository to your system:

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

After the repository is added, run the following command to install it:

sudo dnf update
sudo dnf install pgadmin4

Since PgAdmin 4 is powered by a web server and is accessed from the front-end, i.e web browser, we need to ensure that the Apache webserver is up and running. So, start the webserver and enable it on boot time:

sudo systemctl start httpd
sudo systemctl enable --now httpd

Step 3. Configure PgAdmin 4.

The pgAdmin software comes with a well-written configuration script to configure the pgAdmin web service. Execute it to create an admin user, configure SELinux policies, and Apache webserver to deploy pgAdmin web service:

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

Step 4. Configure Firewall.

If you have an active firewall service, allow HTTP port:

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --reload

Step 5. Accessing pgAdmin 4 Web Interface.

Once successfully installed, open your web browser and go to the following address: http://your-server-ip-address/pgadmin4/ or http://localhost/pgadmin4/

Install pgAdmin 4 on AlmaLinux 8

Congratulations! You have successfully installed pgAdmin. Thanks for using this tutorial for installing the pgAdmin 4 on your AlmaLinux 8 system. For additional help or useful information, we recommend you check the official pgAdmin website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!