Skip to content

Instantly share code, notes, and snippets.

@89465127
Last active December 16, 2015 19:39
Show Gist options
  • Save 89465127/5486327 to your computer and use it in GitHub Desktop.
Save 89465127/5486327 to your computer and use it in GitHub Desktop.
How to unzip and install Spark on Ubuntu.
# Download and unzip spark to your home directory
# You may want to run update if it's on a fresh OS
sudo apt-get update
# Install dependencies (& verify)
sudo apt-get install default-jdk scala git
java -version; javac -version; scala -version; git --version
# Configure - run these in your open terminal and add them to ~/.bashrc
export SPARK_HOME=~/spark-0.7.0
export SPARK_LAUNCH_WITH_SCALA=1
export SCALA_HOME=/usr
export PATH=$PATH:$SCALA_HOME/bin
# Build
cd ~/spark-0.7.0
sbt/sbt package
# Test
./run spark.examples.SparkPi local[2]
@89465127
Copy link
Author

Optional: install sbt with the ubuntu package manager -- http://stackoverflow.com/questions/13711395/install-sbt-on-ubuntu/13718915#13718915

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