本文主要是介绍Centos8下安装Spark,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
1、下载压缩包
命令:wget https://downloads.lightbend.com/scala/2.11.8/scala-2.11.8.tgz
2、解压缩包
命令:tar -xzvf scala-2.11.8.tgz
3、环境变量配置
export JAVA_HOME=/opt/java/jdk1.8.0_301
export HADOOP_HOME=/opt/Hadoop/hadoop-2.7.3
export HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop
export HADOOP_COMMON_LIB_NATIVE_DIR=${HADOOP_HOME}/lib/native
export SPARK_HOME=/opt/spark/spark-2.1.0-bin-hadoop2.6
export SCALA_HOME=/opt/scala/scala-2.11.8
export CLASSPATH=$:CLASSPATH:$JAVA_HOME/lib/
export PATH=.:${JAVA_HOME}/bin:${HIVE_HOME}/bin:${HADOOP_HOME}/bin:/opt/mongodb/bin:${SPARK_HOME}/bin:${SCALA_HOME}/bin:$PATH
export JAVA_LIBRARY_PATH=$HADOOP_HOME/lib/native
export HIVE_HOME=/opt/hive/apache-hive-2.3.9-bin
export HIVE_CONF_DIR=${HIVE_HOME}/conf
4、启动Spark
命令(没有空格!!没有空格!!!没有空格!!!闷头查了半天bash,,,,):spark-shell
这篇关于Centos8下安装Spark的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!