Last active
November 14, 2017 14:48
-
-
Save steviee/024008c14955117fbb2d6e5f58700ff6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Update system | |
sudo apt-get update && sudo apt-get dist-upgrade | |
# Install Java | |
sudo apt-get install default-jdk-headless | |
# Download & Install Hadoop | |
wget http://apache.mirrors.tds.net/hadoop/common/hadoop-2.8.2/hadoop-2.8.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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment