#Download the latest version of Spark from Apace Spark website. For this installation step, we used the latest Spark stable release 1.6.1 version. 
After downloading finished, you will find the Spark tar file in the download folder. Extract the Scala tar file by extracting on its location or more type the following command for extracting the Scala tar file from the terminal.

tar -xvzf spark-1.6.1-bin-hadoop2.6.tgz  

# Now move Scala distribution to users perspective (e.g. /usr/local/spark) by the following command or do it manually: 

cd /home/Downloads/ 
mv spark-1.6.1-bin-hadoop2.6 /usr/local/spark 

# To set after Spark installing, just apply below commands:

echo "export SCALA_HOME=/usr/local/spark/spark-1.6.1-bin-hadoop2.6" >> ~/.bashrc  
echo "export PATH=$PATH:$SCALA_HOME/bin" >> ~/.bashrc

#Make all the changes permanent. Source the ~/.bashrc file using below command to make the change permanent:
source ~/.bashrc

#Verify the Spark installation using below commands
spark-shell

if Spark was installed and configured correctly, you will see the cmessag on terminal like Figure 6 and 7 accordingly.



