1 spark安装前要有Java环境和Scala,注意spark和scala的版本一点要对应上,可以取官网查看
2 去官网下载spark包,下载spark-2.2.2-bin-hadoop2.7.tgz这种结构的,spark-2.2.2.tgz这是源码,安装后无法运行.
3
sudo tar -xzvf spark-2.2.2-bin-hadoop2.7.tgz && sudo mv spark-2.2.2-bin-hadoop2.7.tgz /spark/
sudo tar -xzvf spark-2.2.2-bin-hadoop2.7.tgz && sudo mv spark-2.2.2-bin-hadoop2.7.tgz /spark/
sudo tar -xzvf spark-2.2.2-bin-hadoop2.7.tgz && sudo mv spark-2.2.2-bin-hadoop2.7.tgz /spark/