电影推荐系统-环境搭建(五) 第四个配置Spark--统一的大数据分析引擎 - MissRong
电影推荐系统-环境搭建(五)
第四个配置Spark–统一的大数据分析引擎
1)解压压缩包
[root@tjx1 local]# tar -zxvf tars/spark-2.1.1-bin-hadoop2.7.tgz -C ./
2)复制配置文件顺带改名
[root@tjx1 local]# cd spark-2.1.1-bin-hadoop2.7/
[root@tjx1 conf]# cp slaves.template slaves
[root@tjx1 conf]# cp spark-env.sh.template spark-env.sh
3)修改配置文件内容
[root@tjx1 conf]# vi slaves
将localhost改成tjx1–从节点
[root@tjx1 conf]# vi spark-env.sh
在末尾添加如下内容:
主节点信息:
SPARK_MASTER_HOST=tjx1
SPARK_MASTER_PORT=7077
JDK所在位置:
JAVA_HOME=/opt/module/jdk1.8.0_144
4)启动Spark伪分布式
[root@tjx1 spark-2.1.1-bin-hadoop2.7]# ./sbin/start-all.sh
5)查看SparkWeb UI页面
6)关闭Spark
[root@tjx1 spark-2.1.1-bin-hadoop2.7]# ./sbin/stop-all.sh
tjx1: stopping org.apache.spark.deploy.worker.Worker
stopping org.apache.spark.deploy.master.Master