Install Ambari on Ubuntu

apt-get update
apt-get install postgresql postgresql-contrib
apt-get install wget
/etc/init.d/postgresql start
cd /etc/apt/sources.list.d
wget http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.1.2/ambari.list
apt-key adv –recv-keys –keyserver keyserver.ubuntu.com B9733A7A07513CAD
apt-get install ambari-server // select default answer for all questions
ambari-server setup
sudo ambari-server start