Step 1: Verifying Java Installation: Download Scala
Step 1: Verifying Java Installation: Download Scala
Step 1: Verifying Java Installation: Download Scala
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.
$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.
$scala -version
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.
https://www.tutorialspoint.com/cgi-bin/printpage.cgi 9/22/2017
Apache Spark Installation Page 2 of 3
Use the following commands for moving the Scala software files, to respective directory
.
$ su – /usr/local/scala
Password:
# cd /home/Hadoop/Downloads/
# mv scala-2.11.6 /usr/local/scala
# exit
$scala -version
If Scala is already installed on your system, you get to see the following response −
$ su –
Password:
# cd /home/Hadoop/Downloads/
# mv spark-1.3.1-bin-hadoop2.6 /usr/local/spark
# exit
https://www.tutorialspoint.com/cgi-bin/printpage.cgi 9/22/2017
Apache Spark Installation Page 3 of 3
$ source ~/.bashrc
$spark-shell
If spark is installed successfully then you will find the following output.
Spark assembly has been built with Hive, including Datanucleus jars on classpath
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
15/06/04 15:25:22 INFO SecurityManager: Changing view acls to: hadoop
15/06/04 15:25:22 INFO SecurityManager: Changing modify acls to: hadoop
15/06/04 15:25:22 INFO SecurityManager: SecurityManager: authentication disabled;
ui acls disabled; users with view permissions: Set(hadoop); users with modify
permissions: Set(hadoop)
15/06/04 15:25:22 INFO HttpServer: Starting HTTP Server
15/06/04 15:25:23 INFO Utils: Successfully started service 'HTTP class server' on
port 43292.
Welcome to
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ `/ __/ '_/
/___/ .__/\_,_/_/ /_/\_\ version 1.4.0
/_/
Using Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_71)
Type in expressions to have them evaluated.
Spark context available as sc
scala>
https://www.tutorialspoint.com/cgi-bin/printpage.cgi 9/22/2017