Installing on Red Hat / Centos / Scientific Linux
The best place to get the latest binaries for both PostgreSQL and PostGIS is from the PostgreSQL download page.
- Select the “Linux” operating system and “Red Hat” distribution.
- Select a “Platform” and an “Architecture”.
- Copy and run the setup script as root.
Further, run the following to add in PostGIS and dependencies.
# Install EPEL repo RPM:
dnf -y install epel-release
# Enable PowerTools repo (required for some of the dependencies):
dnf -y config-manager --set-enabled PowerTools
# Now, you can finally install PostGIS
# Select the right PostGIS and PostgreSQL versions
dnf -y install postgis33_15
systemctl restart postgresql-15