Search

Easy Steps on How to Install pgAdmin Rocky Linux 9 - Guide

Welcome to our tutorial on how to install pgAdmin on Rocky Linux 9. In this guide, we will walk you through the step-by-step process of installing pgAdmin 4, an open-source PostgreSQL database administration tool, on your Rocky Linux system.

With pgAdmin 4, you can easily manage your databases from a web browser, thanks to its user-friendly interface and powerful features. Whether you are a beginner or an experienced administrator, this installation tutorial will guide you through the process.

By the end of this guide, you will have pgAdmin 4 up and running on your Rocky Linux 9 system, ready to help you efficiently manage your PostgreSQL databases.

Prerequisites for Installing pgAdmin on Rocky Linux

Before you can install pgAdmin on Rocky Linux 9, there are a few prerequisites that need to be met. First and foremost, you should already have PostgreSQL installed on your Rocky Linux system, as pgAdmin is a front-end tool specifically designed for PostgreSQL. If you haven't installed PostgreSQL yet, you can refer to our guide on how to install it on Rocky Linux 9.

In addition to having PostgreSQL installed, it's important to ensure that you have the necessary permissions and access to install packages and modify system configurations. This is crucial for a smooth installation process and proper functioning of pgAdmin on your Rocky Linux system.

To summarize, here are the prerequisites for installing pgAdmin on Rocky Linux 9:

  1. PostgreSQL must be installed
  2. Have the necessary permissions and access to install packages and modify system configurations

By meeting these prerequisites, you'll be ready to proceed with the installation of pgAdmin on your Rocky Linux system and take advantage of its powerful features for managing your PostgreSQL databases.

Adding the pgAdmin4 Repository on Rocky Linux

To install pgAdmin4 on Rocky Linux, the first step is to add the pgAdmin4 repository. This can be done by following a few simple steps:

  1. Install the yum-utils package by running the command: sudo dnf install yum-utils
  2. Disable the PostgreSQL common repositories by running the command: sudo dnf config-manager --disable pgdg-common
  3. Download the pgAdmin4 repository rpm package by running the command: sudo dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
  4. Install the pgAdmin4 repository by running the command: sudo dnf install pgadmin4

Configuring the pgAdmin4 Repository

After adding the pgAdmin4 repository, you need to configure it to ensure smooth installation. Here are the steps:

  1. Open the pgAdmin4 configuration file using a text editor: sudo vi /etc/httpd/conf.d/pgadmin4.conf
  2. Change the Require local line to Require all granted to allow remote access to the pgAdmin4 interface.
  3. Save and exit the file.

Starting the pgAdmin4 Service

Once the repository is added and configured, you need to start the pgAdmin4 service. Follow these steps:

  1. Start the Apache webserver service by running the command: sudo systemctl start httpd
  2. Enable the Apache webserver service to start on boot by running the command: sudo systemctl enable httpd
  3. Start the pgAdmin4 service by running the command: sudo systemctl start pgadmin4
  4. Enable the pgAdmin4 service to start on boot by running the command: sudo systemctl enable pgadmin4

With the pgAdmin4 repository added, configured, and the service started, you are now ready to proceed with the installation and configuration of pgAdmin4 on Rocky Linux.

Installing pgAdmin4 on Rocky Linux

Now that you have added the pgAdmin4 repository, it's time to install pgAdmin4 on your Rocky Linux system. Follow these step-by-step instructions to complete the installation process:

Update your system repositories by running the following command:

sudo dnf update

Once the system is updated, you can proceed with the installation of pgAdmin4. Run the following command to start the installation:

sudo dnf install pgadmin4

The installation process will automatically install the Apache webserver and other dependencies required by pgAdmin4. You will be prompted to confirm the installation - simply type 'y' and press Enter to proceed.

After the installation is complete, you can start the Apache webserver by running the following command:

sudo systemctl start httpd

And that's it! You have successfully installed pgAdmin4 on Rocky Linux. Now you can move on to the next step of configuring pgAdmin4 before you can start using it.

Configuring pgAdmin4 on Rocky Linux

After successfully installing pgAdmin4 on Rocky Linux, the next step is to configure it for optimal performance. This involves a few essential tasks to ensure that pgAdmin4 is properly set up and ready to be accessed through a web browser.

Starting and Enabling Apache Webserver

Firstly, you need to start and enable the Apache webserver, which is necessary for pgAdmin4 to function correctly. You can do this by running the following commands in the terminal:

sudo systemctl start httpd

sudo systemctl enable httpd

Setting up pgAdmin4

Once the Apache webserver is up and running, you need to set up pgAdmin4 using the provided setup script. This script will guide you through the initial configuration process and allow you to customize certain settings. To run the setup script, use the following command:

sudo /usr/pgAdmin4/setup-web.sh

Adjusting SELinux Settings and Firewall Configuration

It is important to adjust the SELinux settings to allow pgAdmin4 to function properly. You can do this by executing the following command:

sudo setsebool -P httpd_can_network_connect_db 1

Additionally, you need to configure the firewall to allow HTTP traffic. Run the following command to enable HTTP access:

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

sudo firewall-cmd --reload

With these steps completed, pgAdmin4 on Rocky Linux is now fully configured and ready to be accessed through a web browser.

Accessing and Using pgAdmin4 on Rocky Linux

Now that pgAdmin4 is installed and configured on your Rocky Linux system, you can easily access and start using it through a web browser. Follow these simple steps to get started:

  1. Open your preferred web browser.
  2. Enter the IP address of your Rocky Linux server followed by "/pgadmin4" in the address bar. For example, if your server's IP address is 192.168.0.100, you would enter "192.168.0.100/pgadmin4".
  3. You will be redirected to the pgAdmin4 login page. Enter your login credentials, including the username and password you set up during the configuration process.
  4. After logging in, you will be greeted with the pgAdmin4 dashboard. From here, you can easily navigate and manage your database servers.

Once you are logged in, you will have access to a range of features and tools within pgAdmin4. Some of the key functionalities include:

  • Adding new database servers: You can easily add new database servers to pgAdmin4 and manage them all in one centralized location.
  • Viewing database details: Get valuable insights into your databases by viewing details such as schemas, tables, views, and indexes.
  • Running SQL queries: Utilize the live SQL query tool to execute queries and retrieve data from your databases.
  • Performing administration tasks: pgAdmin4 provides a wide array of tools for performing various administration tasks, such as creating and modifying database objects, managing user accounts, and optimizing database performance.

With pgAdmin4 on Rocky Linux, you have a powerful and user-friendly tool at your disposal for efficiently managing your PostgreSQL databases. Enjoy the convenience of a web-based interface that allows you to access your databases from anywhere, anytime.

Conclusion

In conclusion, installing pgAdmin on Rocky Linux 9 is a simple and efficient process. By following the step-by-step guide provided in this article, you can easily install and start using pgAdmin4 to manage your databases.

To begin, ensure that you have met the prerequisites, including having PostgreSQL already installed on your Rocky Linux system. Then, add the pgAdmin4 repository and proceed with the installation. Once installed, configure pgAdmin4 by starting the Apache webserver, setting up pgAdmin4 using the setup script, adjusting SELinux settings, and configuring the firewall.

With pgAdmin4 properly configured, you can now access it through a web browser and enjoy its user-friendly interface and powerful features. Add new database servers, view database details, and perform various administration tasks with ease.

Overall, pgAdmin is a valuable tool for database administrators, providing a streamlined and efficient platform for managing databases on Rocky Linux 9. Follow the steps outlined in this guide and take full advantage of pgAdmin's capabilities.

Sys Admin

Sys Admin

I am a Red Hat Certified Engineer (RHCE) and working as an IT Professional since 2012...