Prerequisites
Before you begin the installation process:
Set up the EDB repository.
Note
Rather than use the EDB repository, you can obtain PostgreSQL installers and installation packages from the PostgreSQL community downloads page.
Setting up the repository is a one-time task. If you already set up your repository, you don't need to perform this step.
To determine if your repository exists, enter:
dnf repolist | grep enterprisedbIf no output is generated, the repository is installed.
To set up the EDB repository:
Go to EDB repositories.
Select the button that provides access to the EDB repository.
Select the platform and software that you want to download.
Follow the instructions for setting up the EDB repository.
Install the EPEL repository:
sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
Enable additional repositories to resolve dependencies:
ARCH=$( /bin/arch ) subscription-manager repos --enable "codeready-builder-for-rhel-10-${ARCH}-rpms"
Make sure DNF installs PostgreSQL from the EDB repository.
On RHEL 10.2, DNF can select PostgreSQL packages from the AppStream repository instead of the EDB repository. To make DNF prefer the EDB repository, set the EDB repository priority to 1.
To make the change permanent, enter:
sudo dnf config-manager --setopt=enterprisedb-enterprise.priority=1 --save enterprisedb-enterprise
Alternatively, to apply the priority to a single installation only, add the
--setoptoption to the install command:sudo dnf install --setopt=enterprisedb-enterprise.priority=1 postgresql<xx>-server postgresql<xx>-contrib
Where
<xx>is the version of PostgreSQL you're installing.
Install the package
sudo dnf -y install postgresql<xx>-server postgresql<xx>-contrib
Where <xx> is the version of PostgreSQL you are installing. For example, if you are installing version 18, the package name would be postgresql18-server postgresql18-contrib.