If you do not know which OS/arch you are using, click here to find your OS/architecture.
Please note that PostgreSQL YUM repository depends some extra repositories. Please refer to the Yum Howto page for details before installing PGDG repository RPM.
There is only one repository RPM per distro which includes repository information for all available PostgreSQL releases.
This repo includes packages that cannot be included in the main repo because of licensing issues.
Unsupported PostgreSQL releases are archived to PostgreSQL YUM archive repo. In order to use this repo, you need to create special repo config files as described below.
Disclaimer: PGDG does not have any responsibility for the unsupported PostgreSQL and/or OS versions.
The RHEL packages work for the corresponding versions on Rocky Linux, AlmaLinux, CentOS and Scientific Linux as well.
Archived PostgreSQL versions | OS/Arch |
---|---|
16 | Fedora 39 - x86_64, Fedora 38 - x86_64 |
15 | Fedora 39 - x86_64, Fedora 38 - x86_64 |
14 | Fedora 39 - x86_64, Fedora 38 - x86_64 |
13 | Fedora 39 - x86_64, Fedora 38 - x86_64 |
12 | Fedora 39 - x86_64, Fedora 38 - x86_64 |
11 | RHEL 9 - x86_64, RHEL 9 - aarch64, RHEL 8 - x86_64, RHEL 8 - aarch64, RHEL 8 - ppc64le, RHEL 7 - x86_64, RHEL 7 - aarch64, RHEL 7 - ppc64le, RHEL 6 - x86_64, RHEL 6 - i386, Fedora 39 - x86_64, Fedora 38 - x86_64 |
10 | RHEL 9-x86_64, RHEL 8 - x86_64, RHEL 8-ppc64le, RHEL 7 - x86_64, RHEL 7 - ppc64le, RHEL 6 - x86_64, RHEL 6 - i386 |
9.6 | RHEL 8 - x86_64, RHEL 7 - x86_64, RHEL 7 - ppc64le, RHEL 6 - x86_64, RHEL 6 - i386 |
9.5 | RHEL 8 - x86_64, RHEL 7 - x86_64, RHEL 7 - ppc64le, RHEL 6 - x86_64, RHEL 6 - i386, RHEL 5 - x86_64, RHEL 5 - i386 |
9.4 | RHEL 8 - x86_64, RHEL 7 - x86_64, RHEL 6 - x86_64, RHEL 6 - i386, RHEL 5 - x86_64, RHEL 5 - i386 |
9.3 | RHEL 7 - x86_64, RHEL 6 - x86_64, RHEL 6 - i386, RHEL 5 - x86_64, RHEL 5 - i386 |
9.2 | RHEL 7 - x86_64, RHEL 6 - x86_64, RHEL 6 - i386, RHEL 5 - x86_64, RHEL 5 - i386 |
9.1 | RHEL 6 - x86_64, RHEL 6 - i386, RHEL 5 - x86_64, RHEL 5 - i386, RHEL 4 - x86_64, RHEL 4 - i386 |
9.0 | RHEL 6 - x86_64, RHEL 6 - i386, RHEL 5 - x86_64, RHEL 5 - i386, RHEL 4 - x86_64, RHEL 4 - i386 |
8.4 | RHEL 6 - x86_64, RHEL 6 - i386, RHEL 5 - x86_64, RHEL 5 - i386, RHEL 4 - x86_64, RHEL 4 - i386 |
8.3 | RHEL 5 - x86_64, RHEL 5 - i386, RHEL 4 - x86_64, RHEL 4 - i386, RHEL 3 - x86_64, RHEL 3 - i386 |
8.2 | RHEL 5 - x86_64, RHEL 5 - i386, RHEL 4 - x86_64, RHEL 4 - i386, RHEL 3 - x86_64, RHEL 3 - i386 |
8.1 | RHEL 5 - x86_64, RHEL 5 - i386, RHEL 4 - x86_64, RHEL 4 - i386 |
8.0 | RHEL 5 - x86_64, RHEL 5 - i386, RHEL 4 - x86_64, RHEL 4 - i386, RHEL 3 - x86_64, RHEL 3 - i386 |
7.4 | RHEL 5 - x86_64, RHEL 5 - i386, RHEL 4 - x86_64, RHEL 4 - i386, RHEL 3 - x86_64, RHEL 3 - i386 |
7.3 | RHEL 5 - x86_64, RHEL 5 - i386, RHEL 4 - x86_64, RHEL 4 - i386, RHEL 3 - x86_64, RHEL 3 - i386 |
If you do not have our GPG keys already, you can download them from here. You can either use the full URL or the path in the gpgkey section of the repo files. Please note that packages v10 and below use the old signing keys. See examples below.
Below is an example to install PostgreSQL 11 on RHEL/Rocky Linux/AlmaLinux 8 with gpgkey as a URL:
cat << EOF > /etc/yum.repos.d/pgdg-11.repo
[pgdg11-archive]
name=PostgreSQL 11 RPMs for RHEL/Rocky Linux/AlmaLinux 8
baseurl=https://yum-archive.postgresql.org/11/redhat/rhel-8-x86_64
enabled=1
gpgcheck=1
gpgkey=https://yum.postgresql.org/keys/PGDG-RPM-GPG-KEY-RHEL
EOF
Now, you can install PostgreSQL 11 on RHEL/Rocky Linux/AlmaLinux 8:
yum install postgresql11-server
We also support older versions of Fedora:
cat << EOF > /etc/yum.repos.d/pgdg-11.repo
[pgdg11-archive]
name=PostgreSQL 11 RPMs for RHEL/Rocky Fedora 38
baseurl=https://yum-archive.postgresql.org/11/fedora/fedora-38-x86_64
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-Fedora
EOF
Now, you can install PostgreSQL 11 on Fedora 38:
yum install postgresql11-server
Below is another example to install PostgreSQL 9.6 on RHEL/CentOS 7:
cat << EOF > /etc/yum.repos.d/pgdg-96.repo
[pgdg96-archive]
name=PostgreSQL 9.6 RPMs for RHEL/CentOS 7
baseurl=https://yum-archive.postgresql.org/9.6/redhat/rhel-7-x86_64
enabled=1
gpgcheck=1
gpgkey=https://yum.postgresql.org/keys/RPM-GPG-KEY-PGDG
EOF
Now, you can install PostgreSQL 9.6 on RHEL/CentOS 7:
yum install postgresql96-server