Install the EPEL repository:
yum install epel-release
Confirm the repository is configured by checking the repo list
yum repolist
You should see the Ambari, HDP utilities, and EPEL repositories in the list
repo id repo name | AMBARI-1.x | Ambari 1.x | HDP-UTILS-1.1.0.16 | Hortonworks Data Platform Utils Version - HDP-UTILS-1.1.0.16 | epel | Extra Packages for Enterprise Linux 5 - x86_64
Install the Ambari bits using yum. This also installs PostgreSQL:
yum install ambari-server