How To Install and Configure Apache Spark on Oracle Linux 9

How To Install and Configure Apache Spark on Oracle Linux 9

in This Tutorial you will Learn " How To Install and Configure Apache Spark on Oracle Linux 9"
Apache Spark is a multi-language engine for executing data engineering, data science, and machine learning on single-node machines or clusters.
__________________________________________________________________________________________________________________________________
Server - Os:  Oracle Linux Server 9.0   64Bit      | IP -192.168.1.50        |Hostname - server.testbox.com
__________________________________________________________________________________________________________________________________
cat /etc/system-release ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y

sudo dnf update -y ; sudo yum install java-17-openjdk java-17-openjdk-devel -y
sudo dnf -y install wget curl -y
curl -L -b "oraclelicense=a" -O https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm
sudo rpm -Uvh jdk-17_linux-x64_bin.rpm
java -version


sudo tee /etc/profile.d/java17.sh <<EOF
export JAVA_HOME=\$(dirname \$(dirname \$(readlink \$(readlink \$(which javac)))))
export PATH=\$PATH:\$JAVA_HOME/bin
export CLASSPATH=.:\$JAVA_HOME/jre/lib:\$JAVA_HOME/lib:\$JAVA_HOME/lib/tools.jar
EOF


source /etc/profile.d/java17.sh
echo $JAVA_HOME
echo $PATH
echo $CLASSPATH

curl -s https://api.github.com/repos/lampepfl/dotty/releases/latest| grep browser_download_url  | egrep '.tar.gz' | cut -d '"' -f 4 | wget -i -
tar -xf scala3-*.tar.gz
mv scala3-*/ /usr/local/share/scala


sudo tee  -a ~/.bashrc <<EOF
export SCALA_HOME=/usr/local/share/scala
export PATH=\$PATH:\$SCALA_HOME/bin
EOF


source ~/.bashrc
scala -version
cd ~/

Offcial web - https://spark.apache.org/downloads.html
curl -O https://dlcdn.apache.org/spark/spark-3.3.2/spark-3.3.2-bin-hadoop3.tgz
tar xvf spark-3.3.2-bin-hadoop3.tgz
mv spark-3.3.2-bin-hadoop3/ /usr/local/spark

sudo nano ~/.bashrc
#add this line
export PATH=$PATH:/usr/local/spark/bin

source ~/.bashrc


spark-shell
sc.version
spark.version
http://<server_ip_address>:4040
firewall-cmd --zone=public --add-port=4040/tcp --permanent ; firewall-cmd --reload




Share on Pinterest
Share on LinkedIn
Share on WhatsApp
Share on Telegram