Javatpoint Logo
Javatpoint Logo

Hadoop Installation

Environment required for Hadoop: The production environment of Hadoop is UNIX, but it can also be used in Windows using Cygwin. Java 1.6 or above is needed to run Map Reduce Programs. For Hadoop installation from tar ball on the UNIX environment you need

  1. Java Installation
  2. SSH installation
  3. Hadoop Installation and File Configuration

1) Java Installation

Step 1. Type "java -version" in prompt to find if the java is installed or not. If not then download java from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html . The tar filejdk-7u71-linux-x64.tar.gz will be downloaded to your system.

Step 2. Extract the file using the below command

Step 3. To make java available for all the users of UNIX move the file to /usr/local and set the path. In the prompt switch to root user and then type the command below to move the jdk to /usr/lib.

Now in ~/.bashrc file add the following commands to set up the path.

Now, you can check the installation by typing "java -version" in the prompt.

2) SSH Installation

SSH is used to interact with the master and slaves computer without any prompt for password. First of all create a Hadoop user on the master and slave systems

To map the nodes open the hosts file present in /etc/ folder on all the machines and put the ip address along with their host name.

Enter the lines below

Set up SSH key in every node so that they can communicate among themselves without password. Commands for the same are:

3) Hadoop Installation

Hadoop can be downloaded from http://developer.yahoo.com/hadoop/tutorial/module3.html

Now extract the Hadoop and copy it to a location.

Change the ownership of Hadoop folder

Change the Hadoop configuration files:

All the files are present in /usr/local/Hadoop/etc/hadoop

1) In hadoop-env.sh file add

2) In core-site.xml add following between configuration tabs,

3) In hdfs-site.xmladd following between configuration tabs,

4) Open the Mapred-site.xml and make the change as shown below

5) Finally, update your $HOME/.bahsrc

On the slave machine install Hadoop using the command below

Configure master node and slave node

After this format the name node and start all the deamons

The easiest step is the usage of cloudera as it comes with all the stuffs pre-installed which can be downloaded from http://content.udacity-data.com/courses/ud617/Cloudera-Udacity-Training-VM-4.1.1.c.zip

Next TopicHDFS




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA