Skip to content

Instantly share code, notes, and snippets.

@nchammas
Created January 21, 2015 03:05
Show Gist options
  • Save nchammas/60b04141f3b9f053faaa to your computer and use it in GitHub Desktop.
Save nchammas/60b04141f3b9f053faaa to your computer and use it in GitHub Desktop.
CentOS-based Spark development image
yum install -y java-1.7.0-openjdk-devel gcc gcc-c++ ant git
yum install -y wget tar unzip time
yum install -y python-devel
curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | python -
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python -
easy_install pip
pip install numpy psutil
export JAVA_HOME="/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71-2.5.3.1.el7_0.x86_64"
# export JAVA_OPTS="-Xms128m -Xmx1g -XX:MaxPermSize=128m"
export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"
# Heap = -Xms512m -Xmx1024m
# PermGen = -XX:PermSize=64m -XX:MaxPermSize=128m
# Thread = -Xss512k
# http://www.mkyong.com/java/find-out-your-java-heap-memory-size/
export JAVA_OPTS="-Xms128m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128m -Xss512k"
# Install Maven (for Hadoop)
pushd /tmp
wget "http://archive.apache.org/dist/maven/maven-3/3.2.3/binaries/apache-maven-3.2.3-bin.tar.gz"
tar xvzf apache-maven-3.2.3-bin.tar.gz
mv apache-maven-3.2.3 /opt/
SCALA_VERSION="2.10.3"
wget "http://www.scala-lang.org/files/archive/scala-$SCALA_VERSION.tgz"
tar xvzf "scala-$SCALA_VERSION.tgz"
mv "scala-$SCALA_VERSION" /opt/
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment