Hadoop Installation(Single-Node)-2/3

Hadoop 1.0.4 on Ubuntu Linux 12.04 ( Single Node )- Part -2/3

Download Hadoop

  • Download a stable hadoop version from http://hadoop.apache.org/
  • I downloaded the this version - hadoop 1.0.4 and this is the link to it stable hadoop download page.
  • Download the file (hadoop-1.0.4.tar.gz) and copy it under the home directory of hadoop_usr ( ie. /home/hadoop_usr/)

Steps to Install

Login to terminal as hadoop_usr and extract the contents of the gz file
tar -xvf hadoop-1.0.4.tar.gz
We have to edit the following configuration file
  1. $HADOOP_HOME/conf/hadoop-env.sh
  2. $HADOOP_HOME/conf/hdfs-site.xml
  3. $HADOOP_HOME/conf/core-site.xml
  4. $HADOOP_HOME/conf/mapred-site.xml
  5. $HADOOP_HOME/conf/masters
  6. $HADOOP_HOME/conf/slaves

$HADOOP_HOME/conf/hadoop-env.sh

set the Java home

# The java implementation to use.Required.
# export JAVA_HOME=/usr/lib/j2sdk1.5-sun
export JAVA_HOME=/usr/lib/jvm/java-7-oracle

$HADOOP_HOME/conf/hdfs-site.xml

before editing this file create the following folder.
mkdir /home/hadoop_usr/hadoop-1.0.4/data
mkdir /home/hadoop_usr/hadoop-1.0.4/name
now edit the hdfs-site.xml and add the following lines
<configuration>
  <property>
    <name>dfs.data.dir</name>
    <value>/home/hadoop_usr/hadoop-1.0.4/data</value>
  </property>
  <property>
    <name>dfs.namenode.name.dir</name>
    <value>/home/hadoop_usr/hadoop-1.0.4/name</value>
  </property>
  <property>
    <name>dfs.replication</name>
    <value>1</value>
  </property>
</configuration>

$HADOOP_HOME/conf/core-site.xml

before editing this file. Create a tmp directory for hadoop's use. I created mine under the following directory.
mkdir /home/hadoop_usr/hadoop-1.0.4/tmp
now edit the core-site.xml file and add the following values
<configuration>
        <property>
                <name>hadoop.tmp.dir</name>
                <value>/home/hadoop_usr/hadoop-1.0.4/tmp/tmp-${user.name}</value>
        </property>
        <property>
                <name>fs.default.name</name>
                <value>hdfs://localhost:9000</value>
        </property>
</configuration>

$HADOOP_HOME/conf/mapred-site.xml

   <property>
     <name>fs.default.name< /name>
     <value>hdfs://localhost:9100</value>
   </property>
   <property>
     <name>mapred.job.tracker< /name>
     <value>localhost:9101< /value>
   </property>

$HADOOP_HOME/conf/masters

Edit this file and add the following line
localhost

$HADOOP_HOME/conf/slaves

Edit this file and add the following line
localhost

Comments

Popular posts from this blog

Tableau - Accessing Tableau's DB

react-bootstrap-table | header column alignment fix

Tableau : Convert ESRI shapes into Tableau Format