How-to Install Apache Hadoop on Gentoo 2012/2013 32/64bit Linux Easy Guide

March 3rd, 2014 by thelinuxevangelist

Install Hadoop 2.X for Gentoo Linux 32/64bit




The Tutorial Shows You Step-by-Step How-to Install and Getting-Started with Apache Hadoop/Map-Reduce vanilla in Pseudo-Distributed mode on Linux Gentoo 2012/2013 x86/amd64 Desktop.

Hadoop is an open source framework for writing and running distributed applications that process Big Data (large amounts of data).

Apache Hadoop Key Features:

  • Accessible: Hadoop runs on large clusters of commodity machines or on cloud computing services such as Amazon’s Elastic Compute Cloud (EC2).
  • Robust: Because it is intended to run on commodity hardware, Hadoop is architected with the assumption of frequent hardware malfunctions. It can gracefully handle most such failures.
  • Scalable: Hadoop scales linearly to handle larger data by adding more nodes to the cluster.
  • Simple: Hadoop allows users to quickly write efficient parallel code.

The Guide Describe a System-Wide Installation with Root Privileges but You Can Easily Convert the Procedure to a Local One.

The Content and Details are Expressly Reduced to Give Focus Only to the Essentials Instructions and Commands.

Install Hadoop on Gentoo Linux 32/64bit - Featured

  1. Download Latest Apache Hadoop Stable Release:

    Apache Hadoop Binary tar.gz

  2. Right-Click on Archive > Open with Ark

    Then Extract Into /tmp

    Install Hadoop on Gentoo Linux 32/64bit - KDE4 Apache Hadoop Stable tar.gz Extraction
  3. Open Terminal Window
    (Press “Enter” to Execute Commands)
    Install Hadoop on Gentoo Linux 32/64bit - Gentoo Open Terminal
  4. Relocate Apache Hadoop Directory
    sudo su

    If Got “User is Not in Sudoers file” then Look: Solution

    mv /tmp/hadoop* /usr/local/
    ln -s /usr/local/hadoop* /usr/local/hadoop
    mkdir /usr/local/hadoop/tmp
    chown -R root:root /usr/local/hadoop*
  5. How-to Install Custom Oracle Java JDK on Gentoo:

    Install Oracle JDK for Gentoo

  • Set JAVA_HOME in Hadoop Env File
    nano /usr/local/hadoop/conf/hadoop-env.sh

    Inserts:

    export JAVA_HOME=/usr/lib/jvm/<oracleJdkVersion>

    Ctrl+x to Save & Exit :)

  • Eclipse Hadoop 2.X Integration with Free Plugin:

    Hadoop 2.X Eclipse Plugin SetUp
  • Configuration for Pseudo-Distributed mode
    nano /usr/local/hadoop/conf/core-site.xml

    The Content Should Look Like:

    <?xml version=”1.0″?>
    <?xml-stylesheet type=”text/xsl” href=”configuration.xsl”?>
    <configuration>
    <property>
    <name>hadoop.tmp.dir</name>
    <value>/usr/local/hadoop/tmp</value>
    </property>
    <property>
    <name>fs.default.name</name>
    <value>hdfs://localhost:8020</value>
    </property>
    </configuration>

    Next:

    nano /usr/local/hadoop/conf/hdfs-site.xml

    The Content Should Look Like:

    <?xml version=”1.0″?>
    <?xml-stylesheet type=”text/xsl” href=”configuration.xsl”?>
    <configuration>
    <property>
    <name>dfs.replication</name>
    <value>1</value>
    </property>
    <property>
    <!– specify this so that running ‘hadoop namenode -format’
    formats the right dir –>
    <name>dfs.name.dir</name>
    <value>/usr/local/hadoop/cache/hadoop/dfs/name</value>
    </property>
    </configuration>

    Latest:

    nano /usr/local/hadoop/conf/mapred-site.xml

    The Content Should Look Like:

    <?xml version=”1.0″?>
    <?xml-stylesheet type=”text/xsl” href=”configuration.xsl”?>
    <configuration>
    <property>
    <name>mapred.job.tracker</name>
    <value>localhost:8021</value>
    </property>
    </configuration>

  • SetUp Path & Environment
    su <myuser>
    cd $HOME
    nano .bashrc

    Inserts:

    HADOOP_HOME=/usr/local/hadoop
    export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin

    The JAVA_HOME is Set Following Oracle Java JDK6+ Installation Version…

    Then Load New Setup:

    source $HOME/.bashrc
  • SetUp Needed Local SSH Connection
    sudo su -c "openssh-server"

    Generate SSH Keys to Access:

    ssh-keygen -b 2048 -t rsa
    cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys

    Testing Connection:

    ssh 127.0.0.1
  • Formatting HDFS
    hadoop namenode -format

    Install Hadoop on Gentoo Linux 32/64bit - Terminal Hadoop HDFS Formatting Succcess

  • Starting Up Hadoop Database
    start-all.sh
  • Apache Hadoop Database Quick-Start Guide:

    Hadoop MapReduce Quick-Start
  • (Visited 23 times, 1 visits today)
    Share on Tumblr

    Tags: , , , , , , , , , , , , ,


    Comments are disabled