Installing Hadoop on Ubuntu

Linux

This is what I did to set up Hadoop on my Ubuntu machine.

  1. Install the Java Development Kit.
$ sudo apt-get install default-jdk
  1. Download the latest release of Hadoop here.
  2. Unpack the archive.
$ tar -xvf hadoop-2.8.0.tar.gz
  1. Move the resulting folder.
$ sudo mv hadoop-2.8.0 /usr/local/hadoop
  1. Find the location of the Java package.
$ readlink -f /usr/bin/java | sed "s#bin/java##"
/usr/lib/jvm/java-8-openjdk-amd64/jre/
  1. Edit the Hadoop configuration file at /usr/local/hadoop/etc/hadoop/hadoop-env.sh and set JAVA_HOME.
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/
  1. Test.
$ /usr/local/hadoop/bin/hadoop version

If the final command returns some information about Hadoop then the installation was successful.

Categorically Variable