Skip to content

Instantly share code, notes, and snippets.

@IgnacioEscobar
Created December 13, 2018 18:24
Show Gist options
  • Save IgnacioEscobar/605d5a2324f52eb488ca9bc3364a8ef5 to your computer and use it in GitHub Desktop.
Save IgnacioEscobar/605d5a2324f52eb488ca9bc3364a8ef5 to your computer and use it in GitHub Desktop.
Script for setting up Apache Spark on a Ubuntu 16.04.5 x64 VM
#!/usr/bin/env bash
# Setup
SparkPath=~/spark-2.4.0-bin-hadoop2.7
cd ~
# Upgrade and download dependencies
sudo apt upgrade --assume-yes
sudo apt install --assume-yes default-jre
sudo apt install --assume-yes scala
# Download Spark
wget http://www-us.apache.org/dist/spark/spark-2.4.0/spark-2.4.0-bin-hadoop2.7.tgz
# Configure path
echo -e "\n#Path to Apache Spark" >> ~/.bashrc
echo "export PATH=$PATH:$SparkPath/bin" >> ~/.bashrc
source ~/.bashrc
# Cleanup
rm ~/spark-2.4.0-bin-hadoop2.7.tgz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment