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

fs.default.name
hdfs://localhost:9000

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

4} hdfs-site.xml

dfs.replication
1

dfs.namenode.name.dir
file:/usr/local/hadoop_tmp/hdfs/namenode

dfs.datanode.data.dir
file:/usr/local/hadoop_tmp/hdfs/datanode

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

5} yarn-site.xml

yarn.nodemanager.aux-services
mapreduce_shuffle

yarn.nodemanager.aux-services.mapreduce.shuffle.class
org.apache.hadoop.mapred.ShuffleHandler

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

mapreduce.framework.name
yarn

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