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 on the EPEL repository for some packages. RHEL/CentOS/etc. users should install the EPEL repo RPM along with PGDG repo RPMs to satisfy dependencies.
As of 15 April 2019, there is only one repository RPM per distro which includes repository information for all available PostgreSQL releases.
Unsupported PostgreSQL releases are archived to PostgreSQL YUM archive repo. In order to use this repo, you need to create special repo config files.
PostgreSQL yum archive repo supports RHEL 5, 6 and 7 for PostgreSQL 8.4 to 9.3.
Below is an example to install PostgreSQL 9.0 on RHEL/CentOS 6:
cat << EOF > /etc/yum.repos.d/pgdg-90.repo
name=PostgreSQL 9.0 RPMs for RHEL/CentOS 6 baseurl=https://yum-archive.postgresql.org/9.0/redhat/rhel-6-x86_64 enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG EOF
Now, you can install PostgreSQL 9.0 on RHEL/CentOS 6:
yum install postgresql90-server