How to Install pgAdmin on CentOS 8

Install pgAdmin on CentOS 8

In this article, we will have explained the necessary steps to install and configure pgAdmin on CentOS 8. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

pgAdmin pgAdmin is the leading graphical Open Source management, development and administration tool for PostgreSQL. pgAdmin4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL database.

Install pgAdmin on CentOS 8

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

Step 2. Install PostgreSQL.

PostgreSQL is included in the default repositories of CentOS 8, and can be installed using the following dnf command:

Once the installation is done, you can initialize the database using the below command:

To start and enable PostgreSQL you need to use the systemctl command:

Step 3. Install pgAdmin on the CentOS system.

To install pgAdmin4 on CentOS 8 we need to add an external repository, so execute the following command:

Then install the pgAdmin package:

Step 4. Configure pgAdmin.

Once we are done installing pgAdmin4, we need to configure the pgAdmin4 by setting up the initial pgAdmin user account and the Apache Web server as below:

Step 5. Configure Firewall.

If the Firewall is enabled, execute the following command to enable HTTP service:

Step 6. Access pgAdmin 4.

To access the pgAdmin web interface, open a browser, and navigate using the following URL:

Congratulation, you have learned how to install and configure pgAdmin 4 on CentOS 8. If you have any questions, please leave a comment below.