Red Hat Enterprise Linux 8
Step 1: Set up the EDB repository
To determine if your repository exists, enter this command:
dnf repolist | grep enterprisedb
If no output is generated, the repository isn’t 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-8.noarch.rpm
Enable additional repositories to resolve dependencies:
ARCH=$( /bin/arch ) subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
Disable the built-in PostgreSQL module:
dnf -qy module disable postgresql
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 16, the package name would be postgresql16-server postgresql16-contrib
.