Install Hadoop on Ubuntu | explained

sudo apt-get install pdsh
$adduser hadoop
$su root
$visudo
#add below line in the file
hadoop ALL=(ALL:ALL) ALL
$su hadoop
$ssh-keygen -t rsa
$cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$chmod 0600 ~/.ssh/authorized_keys
$ssh localhost
$exit
export HADOOP_HOME=/home/hadoop/hadoop
export HADOOP_INSTALL=$HADOOP_HOME
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 PATH=$PATH:$HADOOP_HOME/sbin:$HADOOP_HOME/bin
export PDSH_RCMD_TYPE=ssh
$cd $HADOOP_HOME/etc/hadoop
$vi hadoop-env.sh
--Add following lines in this fileexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
export HDFS_NAMENODE_USER="hadoop"
export HDFS_DATANODE_USER="hadoop"
export HDFS_SECONDARYNAMENODE_USER="hadoop"
export YARN_RESOURCEMANAGER_USER="hadoop"
export YARN_NODEMANAGER_USER="hadoop"
$cd $HADOOP_HOME/etc/hadoop
$vi core-site.xml
hdfs-site.xml
--Add following lines insie the configuration tag<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
$cd $HADOOP_HOME/etc/hadoop
$vi hdfs-site.xml
--Add following lines in between the <configuration></configuration><property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>file:///home/hadoop/namenode</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>file:///home/hadoop/datanode</value>
</property>
$cd $HADOOP_HOME/etc/hadoop
$vi mapred-site.xml
--Add following lines in between the <configuration></configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
$cd $HADOOP_HOME/etc/hadoop
$vi yarn-site.xml
--Add following lines in between the <configuration></configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
$cd $HADOOP_HOME/sbin/
$sudo ./start-all.sh
or
$sudo ./start-dfs.sh
$sudo ./start-yarn.sh
--list all running processes
$jps
$cd $HADOOP_HOME/hadoop/sbin
$sudo ./stop-all.sh

--

--

--

Data Engineering | Machine Learning | Front-end | NIT Trichy

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Registration for the Klaytn-Covalent Unified Hackathon is now open

CS373 Fall 2021: Daniel Cai

My quarantine side project: Free Coding Bootcamp 2020 MERN Stack

VulnHub’s DevContainer 1 CTF Walkthrough

Hosting Webflow Sites for Free: The Definitive Guide

An illustration of Github pages and netlify

Dec 2020 Update: Tips and Tricks to Passing the CBT Electrical Power PE Exam

Introduction to Kubernetes components

Best Singapore VPS Recommendation 2021: Cheap Cloud Server in Singapore

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Parmanand kumar

Parmanand kumar

Data Engineering | Machine Learning | Front-end | NIT Trichy

More from Medium

DATA INGESTION FROM AWS S3 TO HDFS

Hadoop 3.2.2 Installation Guide for Windows 10

AZURE DP-100 EXAM GUIDE

How to install Hadoop 3 on Ubuntu