Académique Documents
Professionnel Documents
Culture Documents
(Single Node)
By
Dr. R. Ragupathy
Assistant Professor
Department of Computer Science and Engineering
Hadoop - Introduction
Hadoop is an open-source framework that allows to store and
process big data in a distributed environment across clusters
of computers using simple programming models.
java –version
contd...
Installation Procedure for Oracle Java 8
If java is not installed in your system, then follow the steps given
below for installing java.
contd...
Installation Procedure for Oracle Java 8
Before step 5 : execute the following
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
Step 5: Install Open Java Runtime Environment (JRE) by executing
the following command:
sudo apt-get install openjdk-8-jre
cd /usr/lib/jvm
sudo ln -s java-8-oracle jdk
SSH and itsKey Generation
SSH and its Key Generation
Before installing Hadoop into the Linux environment, need to
set up Linux using ssh (Secure Shell).
ssh-keygen -t rsa
SSH and its Key Generation
Step 3: Store the Keys and Passphrase by answering few more
questions. The entire key generation process looks like
this:
ssh-copy-id ragupathy@ragupathy-Ideapad-Z560
wget https://archive.apache.org/dist/hadoop/core/hadoop-
2.7.2/hadoop-2.7.2.tar.gz
Hadoop Installation
Procedure
Step 2: Extract hadoop-2.7.2.tar.gz by executing the following
command:
mv hadoop-2.7.2 /home/ragupathy/hadoop
Hadoop Installation Procedure
The following are the list of files to edit to configure Hadoop
~/.bashrc
/home/ragupathy/hadoop/etc/hadoop/hadoop-env.sh
/home/ragupathy/hadoop/etc/hadoop/core-site.xml
/home/ragupathy/hadoop/etc/hadoop/yarn-site.xml
/home/ragupathy/hadoop/etc/hadoop/mapred-site.xml
/home/ragupathy/hadoop/etc/hadoop/hdfs-site.xml
Hadoop Installation Procedure
Step 5: Use the following command to modify the ~/.bashrc
source ~/.bashrc
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
Hadoop Installation Procedure
Step 8: Edit 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>
Hadoop Installation Procedure
Step 9 : Edit mapred-site.xml
cp /home/ragupathy/hadoop/etc/hadoop/mapred-
site.xml.template
/home/ragupathy/hadoop/etc/hadoop/mapred-site.xml
Hadoop Installation Procedure
Step 10: Edit mapred-site.xml
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
Hadoop Installation Procedure
Step 11: Edit hdfs-site.xml
mkdir -p /home/ragupathy/hadoop/hdfs/namenode
mkdir -p /home/ragupathy/hadoop/hdfs/datanode
Hadoop Installation Procedure
Step 12: Open /home/ragupathy/hadoop/etc/hadoop/hdfs-site.xml and enter the
following content in between the tag <configuration> </configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/ragupathy/hadoop/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/ragupathy/hadoop/hdfs/datanode</value>
</property>
Verifying Hadoop Installation
Step 13: Set up the NameNode using the command “hdfs
namenode -format” as follows.
Note:
(i) The first step to starting up the hadoop installation is
formatting the Hadoop file system.
jps