原文链接:https://www.cnblogs.com/shaosks/p/9242536.html
测试环境:centos7.6
测试系统:spark-2.4.3
提前安装
yum -y install wget
首先,到http://spark.apache.org/downloads.html查找你所需要的spark版本
然后找到下载地址
http://mirrors.tuna.tsinghua.edu.cn/apache/spark/spark-2.4.3/spark-2.4.3-bin-hadoop2.7.tgz
创建文件夹存放
mkdir /home/sks
cd /home/sks
下载安装包
wget http://mirrors.tuna.tsinghua.edu.cn/apache/spark/spark-2.4.3/spark-2.4.3-bin-hadoop2.7.tgz
解压
tar -zxvf spark-2.4.3-bin-hadoop2.7.tgz
创建存放spark目录
mkdir -p /usr/local/spark
移动文件
cp -r spark-2.4.3-bin-hadoop2.7 /usr/local/spark
进入根目录
cd ~
vi .bash_profile
添加下列语句
export SPARK_HOME=/usr/local/spark/spark-2.4.3-bin-hadoop2.7
export PATH=
P
A
T
H
:
PATH:
PATH:SPARK_HOME/bin
source .bash_profile 生效环境变量
spark-shell启动