Skip to content

Instantly share code, notes, and snippets.

@NLKNguyen
Created February 14, 2017 10:38
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save NLKNguyen/c5ae01df00c0c1c4643ba191252e88ae to your computer and use it in GitHub Desktop.
Save NLKNguyen/c5ae01df00c0c1c4643ba191252e88ae to your computer and use it in GitHub Desktop.
Install Hadoop on Ubuntu 16.04
# Copy line by line and paste to an interactive shell
# Update system
sudo apt-get update && sudo apt-get dist-upgrade
# Install Java
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-7-jdk
# Download & Install Hadoop
wget http://apache.mirrors.tds.net/hadoop/common/hadoop-2.7.2/hadoop-2.7.2.tar.gz -P ~/Downloads
sudo tar zxvf ~/Downloads/hadoop-* -C /usr/local
sudo mv /usr/local/hadoop-* /usr/local/hadoop
# Configure environment (copy the whole block)
echo "
export JAVA_HOME=$(readlink -f $(which java))
export PATH=\$PATH:\$JAVA_HOME/bin
export HADOOP_HOME=/usr/local/hadoop
export PATH=\$PATH:\$HADOOP_HOME/bin
export HADOOP_CONF_DIR=/usr/local/hadoop/etc/hadoop
" >> ~/.bashrc
# Load configure
source ~/.bashrc
@131250131
Copy link

hey bro, your work is cool

@arwankhoiruddin
Copy link

Hi Bro. The link to download Hadoop is broken

@wfrsilva
Copy link

wfrsilva commented Sep 23, 2018

@arwankhoiruddin
I think is necessary change the link with the version you want to use:
In my case, here is 3,0,3:
hadoop-3.0.3/
so
wget http://apache.mirrors.tds.net/hadoop/common/hadoop-3.0.3/hadoop-3.0.3.tar.gz -P ~/Downloads

The avaliable versions: http://apache.mirrors.tds.net/hadoop/common/
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment