Install Single Node Hadoop on Mac

Operating System: Mac OSX Yosemite
Hadoop Version 2.7.2

Pre-requisites
We need to enable SSH to localhost without a passphrase.

Go to System Preferences, then check “Remote Login” to ON.

Now in a terminal window, ensure that the following succeeds with no passphrase.
$>ssh localhost

Download Hadoop Distribution
Download the latest hadoop distribution from http://mirrors.ibiblio.org/apache/hadoop/common/hadoop-2.7.2/

Hadoop Configuration Files

Go to the directory where your hadoop distribution is installed.

Then change the following files
hadoop_distro/etc/hadoop/hdfs-site.xml

<configuration>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
</configuration>

hadoop_distro/etc/hadoop/core-site.xml

<configuration>
    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://localhost:9000</value>
    </property>
</configuration>

hadoop_distro/etc/hadoop/yarn-site.xml

<configuration>
    <property>
        <name>yarn.nodemanager.aux-services</name>
        <value>mapreduce_shuffle</value>
    </property>
</configuration>

hadoop_distro/etc/hadoop/mapred-site.xml

<configuration>
    <property>
        <name>mapreduce.framework.name</name>
        <value>yarn</value>
    </property>
</configuration>

Format HDFS
$bin/hdfs namenode -format

Start HDFS
$sbin/start-dfs.sh

Start YARN
$sbin/start-yarn.sh