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.15 | Hortonworks Data Platform Utils Version - HDP-UT | epel | Extra Packages for Enterprise Linux 5 - x86_64
Install the Ambari bits using yum. This also installs PostgreSQL:
yum install ambari-server
You are asked if you want to allow the installation of a GPG key. Allow it. This key is used to certify the installation bits.