Skip to content

Instantly share code, notes, and snippets.

@mdsami
Forked from NLKNguyen/install.sh
Last active April 6, 2019 15:19
Show Gist options
  • Save mdsami/ac691aa60a4a7231a059b53bab96e29d to your computer and use it in GitHub Desktop.
Save mdsami/ac691aa60a4a7231a059b53bab96e29d 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
# Download & Install Hadoop
wget http://apache.mirrors.tds.net/hadoop/common/hadoop-3.0.3/hadoop-3.0.3.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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment