Installing Hortonworks Hadoop on Amazon EC2

After viewing this youtube video and following article How to Hadoop , I was able to successfully install Hortonworks Hadoop on a 4-node cluster on Amazon EC2. However I needed to make the following additions below to make it work properly:

1. Make sure that you install postgresql-8.4, not postgresql-9.1

If you did yum install postgresql, it may have installed postgresql-9.1
if that is the case, then you need to erase it:

yum erase postgresql

Download the 8.4 version
curl -O http://yum.postgresql.org/8.4/redhat/rhel-5-x86_64/pgdg-centos-8.4-3.noarch.rpm

yum install postgresql84
yum install postgresql84-server

2. edit the file /usr/sbin/ambari-server.py as follows:

Change

PG_HBA_DIR = "/var/lib/pgsql/data/"

to

PG_HBA_DIR = "/var/lib/pgsql/8.4/data/"

3. Make sure that the bindir for postgresql is added to the PATH

export PATH=$PATH:/usr/pgsql-8.4/bin

4. Make sure that the “ambari-server” user is created and add the following

Otherwise, you will obtain the following error:
...
internal exception: org.postgresql.util.psqlexception: fatal: ident authentication failed for user "ambari-server"

Also, edit the /var/lib/pgsql/8.4/data/pg_hba.conf file
and add the following line:

host    all         all         127.0.0.1/32          md5
solution referenced from : http://stackoverflow.com/questions/4562471/connecting-to-local-instance-of-postgresql-with-jdbc