How to install Apache Spark on Ubuntu?
This tutorial is for Ubuntu Users. For Windows users, you can directly install Apache Spark from the below link and start it directly on Powershell.
Download the latest Spark from Apache Website https://spark.apache.org/downloads.html
Open the download folder in the terminal and run the below command to extract.
tar xvf spark-3.3.1-bin-hadoop3.tgz
Now move the extracted folder to /opt/spark
sudo mv spark-3.3.1-bin-hadoop3/ /opt/spark
Add path to .bashrc file
export SPARK_HOME=/opt/spark export PATH=$PATH:$SPARK_HOME/bin:$SPARK_HOM/sbin
and refresh source
Now you will be able to run all spark commands from the terminal.
For example, To start the spark server with master and worker-run the below command and then enter jps and open http://localhost:8080 to see the spark GUI
To run spark-shell REPL directly in the terminal run the below command
Let's Connect on: