0% found this document useful (0 votes)
147 views9 pages

Edureka Apache Hadoop Single Node Cluster On Ubuntu

The document provides steps to install Hadoop with a single datanode on an Ubuntu virtual machine. This includes downloading and configuring Ubuntu, installing Java and openssh-server, extracting and configuring Hadoop, generating SSH keys, and starting Hadoop processes. Key steps are configuring core-site.xml, hdfs-site.xml, and mapred-site.xml files, formatting the namenode, and starting the datanode, namenode, task tracker and job tracker services.

Uploaded by

sivamuthucse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
147 views9 pages

Edureka Apache Hadoop Single Node Cluster On Ubuntu

The document provides steps to install Hadoop with a single datanode on an Ubuntu virtual machine. This includes downloading and configuring Ubuntu, installing Java and openssh-server, extracting and configuring Hadoop, generating SSH keys, and starting Hadoop processes. Key steps are configuring core-site.xml, hdfs-site.xml, and mapred-site.xml files, formatting the namenode, and starting the datanode, namenode, task tracker and job tracker services.

Uploaded by

sivamuthucse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Hadoop Installation with Single DataNode

 Go to the below link and download the image of ubuntu 12.04


 http://www.traffictool.net/vmware/ubuntu1204t.html

 Open VMware Player and click open virtual machine and select path where you
have extracted image of Ubuntu. After that select the .vmx file and click ok.

 Now you can see the below screen in VMware Player.


 Double click on ubuntu present in VMware Player. You will get a screen of the
below image.

Username : user
Password : password

 Open a Terminal

 Update the repository:


 Command: sudo apt-get update
 Once the Update is complete :
 Command: sudo apt-get install openjdk-6-jdk

 After Java has been Installed, To check whether Java is installed on your system or
not give the below command :
 Command:java -version

 Install openssh-server:
 Command: sudo apt-get install openssh-server
 Download and extract Hadoop:
 Command: wget http://archive.apache.org/dist/hadoop/core/hadoop-1.2.0/hadoop-
1.2.0.tar.gz
 Command: tar -xvf hadoop-1.2.0.tar.gz

 Edit core-site.xml:
 Command: sudo gedit hadoop-1.2.0/conf/core-site.xml

<property>

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

<value>hdfs://localhost:8020</value>

</property>
 Edit hdfs-site.xml:
 Command: sudo gedit hadoop-1.2.0/conf/hdfs-site.xml

<property>

<name>dfs.replication</name>

<value>1</value>

</property>

<property>

<name>dfs.permissions</name>

<value>false</value>

</property>
 Edit mapred-site.xml:
 Command: sudo gedit hadoop-1.2.0/conf/mapred -site.xml

<property>

<name>mapred.job.tracker</name>

<value>localhost:8021</value>

</property>
 Get your ip address:
 Command: ifconfig
 Command: sudo gedit /etc/hosts
 Create a ssh key:
 Command: ssh-keygen -t rsa –P ""

 Moving the key to authorized key:


 Command: cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys

-----------------------Reboot the system------------------------


Configuration
 Add JAVA_HOME in hadoop-env.sh file:
 Command: sudo gedit hadoop-1.2.0/conf/hadoop-env.sh
 Type :export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-i386

Uncomment the below shown export and add the below the path to your
JAVA_HOME:

 Change the directory where hadoop is installed.


 Command: cd hadoop-1.2.0
 Format the name node
 Command: bin/hadoop namenode -format

 Start the namenode, datanode


 Command: bin/start-dfs.sh

 Start the task tracker and job tracker


 Command: bin/start-mapred.sh

 To check if Hadoop started correctly


 Command: jps

You might also like