(1) 安裝jdk
https://www.oracle.com/technetwork/cn/java/javase/downloads/jdk8-downloads-2133151-zhs.html
目前是1.8版本伪阶,8u181, 181 代表第181次更新
(2)安裝scala
scala 下載:http://www.scala-lang.org/files/archive/scala-2.13.0.tgz
mac 在特定目錄鳖昌,新建“Scala” 文件夾:command+shift+G揍庄,輸入? /Users/gcy/
scala 下載:https://www.apache.org/dyn/closer.lua/spark/spark-2.3.0/spark-2.3.0-bin-hadoop2.7.tgz
將文件移到特定目錄解壓: cd /Users/gcy/Scala? ? ?>tar -xzf scala-2.13.0.tgz
打開配置全局環(huán)境變量腳本:sudo vim /etc/profile
添加環(huán)境變量:SCALA_HOME="/Users/gcy/Scala/scala-2.13.0"
export PATH="$PATH:/Users/gcy/Scala/scala-2.13.0/bin"
SHELL退出:按esc? ? 輸入:wq!?
更新腳本:source /etc/profile
命令行輸入:scala? ? 檢測是否成功
scala 命令行退出::quit
(2)安裝spark
spark 下載:https://www.apache.org/dyn/closer.lua/spark/spark-2.3.0/spark-2.3.0-bin-hadoop2.7.tgz
將文件移到特定目錄解壓: cd /Users/gcy/Spark? ? >tar -xzf spark-2.3.3-bin-hadoop2.7
打開配置全局環(huán)境變量腳本:sudo vim /etc/profile
添加環(huán)境變量:SPARK_HOME="/Users/gcy/Spark/spark-2.3.3-bin-hadoop2.7"
? ? ? ? ? ? ? ? ? ? ? ? ?export PATH=${PATH}:${SPARK_HOME}/bin
SHELL退出:按esc? ? 輸入:wq!?
更新腳本:source /etc/profile
命令行輸入:spark-shell伊滋,檢測spark 是否安裝成功