Ambari uses a local postgres db by default.This page describes how to use ambari-server with remote postgres server.
Ambari is installed on centos 6.4 with the following command:
curl -so /etc/yum.repos.d/ambari.repo http://public-repo-1.hortonworks.com/ambari/centos6/1.x/GA/ambari.repo
yum repolist
yum -y install ambari-server