mac下spark环境搭建:
1.scala 下载scala-2.10.6.tar地址:http://www.scala-lang.org/
配置exportPATH="$PATH:/usr/local/scala/scala-2.10.6/bin"
2.spark 下载spark-1.6.0-bin-hadoop2.6.tgz地址:http://spark.apache.org/
配置 cd spark-1.6.0-bin-hadoop2.6/conf
mv spark-env.sh.template spark-env.sh
vi spark-env.sh添加
查看java路径/usr/libexec/java_home -V
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
exportSCALA_HOME=/usr/local/scala/scala-2.10.6
exportSPARK_MASTER_IP=localhost
exportSPARK_LOCAL_IP=localhost
exportSPARK_WORKER_MEMORY=2g
3.配集群需在conf下配置把各个slave节点加到slaves中去,在各个slave上进行安装配置,并配好各slave和master之间的ssh信任。