Photo by Pixabay on Pexels.com

java -version

sudo apt-get update

sudo apt-get install default-jdk

sudo addgroup hadoop

sudo adduser –ingroup hadoop hadoopuser

sudo adduser hadoopuser sudo

sudo apt-get install openssh-server

su – hadoopuser

ssh -keygen -t rsa -P “”

cat $HOME/.ssh/id_rsa.pub>>$HOME/.ssh/authorized_keys

ssh localhost

exit

cd/home/Desktop

sudo tar -xzvf hadoop-2.9.0.tar.gz

ls

sudo mv hadoop-2.9.0 /usr/local/hadoop

sudo chown -R hadoopuser /usr/local

sudo gedit ~/.bashrc

1} .bashrc

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

export HADOOP_HOME=/usr/local/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

export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native

export HADOOP_OPTS=”-Djava.library.path=$HADOOP_HOME/lib”

source ~/.bashrc

sudo gedit /usr/local/hadoop/etc/hadoop/hadoop-env.sh

2} hadoop-env.sh

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

sudo gedit /usr/local/hadoop/etc/hadoop/core-site.xml

3} core-site.xml

<property>

<name>fs.default.name</name>

<value>hdfs://localhost:9000</value>

</property>

sudo gedit /usr/local/hadoop/etc/hadoop/hdfs-site.xml

4} hdfs-site.xml

<property>

<name>dfs.replication</name>

<value>1</value>

</property>

<property>

<name>dfs.namenode.name.dir</name>

<value>file:/usr/local/hadoop_tmp/hdfs/namenode</value>

</property>

<property>

<name>dfs.datanode.data.dir</name>

<value>file:/usr/local/hadoop_tmp/hdfs/datanode</value>

</property>

sudo gedit /usr/local/hadoop/etc/hadoop/yarn-site.xml

5} 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>

sudo cp /usr/local/hadoop/etc/hadoop/mapred-site.xml template /usr/local/hadoop/mapred-site.xml

sudo gedit /usr/local/hadoop/etc/hadoop/mapred-site.xml

6} mapred-site.xml

<property>

<name>mapreduce.framework.name</name>

<value>yarn</value>

</property>

sudo mkdir -p /usr/local/hadoop_space

sudo mkdir -p /usr/local/hadoop_space/namenode

sudo mkdir -p /usr/local/hadoop_space/datanote

sudo chown -R hadoopuser /usr/local/hadoop_space

cd

hdfs namenode -format

start -dfs.sh

start -yarn.sh

jsp

Hadoop Installation & Setup is Completed !!

Leave a Reply