Hadoop 3.2.1. on Ubuntu 18.04 (Pseudo-Distribuited)

on a ORACLE VM VirtualBox Machine.

[ Install SSH ]

[ Install PDSH ]

[ Edit .bashrc ]

export PDSH_RCMD_TYPE=ssh

[ New Key ]

ssh-keygen -t rsa -P “”
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh localhost

[ Install JAVA 8 ]

[ Download Hadoop 3.2.1 ]

sudo wget -P ~ https://mirrors.sonic.net/apache/hadoop/common/hadoop-3.2.1/hadoop-3.2.1.tar.gz

[ Check the Java’s path ]

ls /usr/lib/jvm/java-8-openjdk-amd64/

[ Editing Files ]

[ hadoop-env.sh ]

nano ~/hadoop/etc/hadoop/hadoop-env.sh
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/

[ core-site.xml ]

nano ~/hadoop/etc/hadoop/core-site.xml
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/<USER>/hdata</value>
</property>

[ hdfs-site.xml ]

nano ~/hadoop/etc/hadoop/hdfs-site.xml
<property>
<name>dfs.replication</name>
<value>1</value>
</property>

[ mapred-site.xml ]

nano ~/hadoop/etc/hadoop/mapred-site.xml
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>yarn.app.mapreduce.am.env</name>
<value>HADOOP_MAPRED_HOME=/home/<USER>/hadoop</value>
</property>
<property>
<name>mapreduce.map.env</name>
<value>HADOOP_MAPRED_HOME=/home/<USER>/hadoop</value>
</property>
<property>
<name>mapreduce.reduce.env</name>
<value>HADOOP_MAPRED_HOME=/home/<USER>/hadoop</value>
</property>
</configuration>

[ yarn-site.xml ]

nano ~/hadoop/etc/hadoop/yarn-site.xml
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>

[ Add more code into the .bashrc ]

export HADOOP_HOME="/home/<USER>/hadoop"
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
export HADOOP_MAPRED_HOME=${HADOOP_HOME}
export HADOOP_COMMON_HOME=${HADOOP_HOME}
export HADOOP_HDFS_HOME=${HADOOP_HOME}
export YARN_HOME=${HADOOP_HOME}

[ Format the Namenode ]

[ Start the HDFS Services ]

[ Start the Yarn Services ]