- Apache Spark Tutorial
Install Spark on Mac OS X Yosemite. GitHub Gist: instantly share code, notes, and snippets. How to Install Scala and Apache Spark on MacOS. Here is a Step by Step guide to installing Scala and Apache Spark on MacOS. Step 1: Get Homebrew. Homebrew makes your life a lot easier when it comes to installing applications and languages on a Mac OS. You can get Homebrew by following the instructions on it’s website.
- Apache Spark Useful Resources
- Selected Reading
Spark is Hadoop’s sub-project. Therefore, it is better to install Spark into a Linux based system. The following steps show how to install Apache Spark.
Step 1: Verifying Java Installation
Java installation is one of the mandatory things in installing Spark. Try the following command to verify the JAVA version.
If Java is already, installed on your system, you get to see the following response −
In case you do not have Java installed on your system, then Install Java before proceeding to next step.
Step 2: Verifying Scala installation
You should Scala language to implement Spark. So let us verify Scala installation using following command.
![Install apache spark windows Install apache spark windows](/uploads/1/1/8/4/118487914/533906449.png)
If Scala is already installed on your system, you get to see the following response −
In case you don’t have Scala installed on your system, then proceed to next step for Scala installation.
Step 3: Downloading Scala
Download the latest version of Scala by visit the following link Download Scala. For this tutorial, we are using scala-2.11.6 version. After downloading, you will find the Scala tar file in the download folder.
Step 4: Installing Scala
Follow the below given steps for installing Scala.
Extract the Scala tar file
Type the following command for extracting the Scala tar file.
Move Scala software files
Use the following commands for moving the Scala software files, to respective directory (/usr/local/scala).
Set PATH for Scala
Use the following command for setting PATH for Scala.
Verifying Scala Installation
After installation, it is better to verify it. Use the following command for verifying Scala installation.
If Scala is already installed on your system, you get to see the following response −
Step 5: Downloading Apache Spark
Download the latest version of Spark by visiting the following link Download Spark. For this tutorial, we are using spark-1.3.1-bin-hadoop2.6 version. After downloading it, you will find the Spark tar file in the download folder.
Apache Spark 3
Step 6: Installing Spark
Follow the steps given below for installing Spark.
Extracting Spark tar
The following command for extracting the spark tar file.
Moving Spark software files
The following commands for moving the Spark software files to respective directory (/usr/local/spark).
Setting up the environment for Spark
Add the following line to ~/.bashrc file. It means adding the location, where the spark software file are located to the PATH variable.
Use the following command for sourcing the ~/.bashrc file.
How To Install Apache Spark
Step 7: Verifying the Spark Installation
Apache Spark 2.4
Write the following command for opening Spark shell.
Download Apache Spark For Windows
If spark is installed successfully then you will find the following output.