启动hive与spark服务
#启动hive servers
#nohup搭配&可以挂起指定的程序在后台,而不会在前台显示程序信息
#hive启动时传参--service metastore
nohup /export/server/apache-hive-3.1.2-bin/bin/hive --service metastore &
#nohup执行程序必须要指定程序的路径,hive当时安装的目录
#启动SPARK,模拟hive的hiveserver2
/export/server/spark-3.1.2-bin-hadoop3.2/sbin/start-thriftserver.sh \
--hiveconf hive.server2.thrift.port=10000\
--hiveconf hive.server2.thrift.bind.host=node1\
--master local[2]
#返回的信息(说明启动成功):starting org.apache.spark.sql.hive.thriftserver.HiveThriftServer2, logging to /export/server/spark-3.1.2-bin-hadoop3.2/logs/spark-root-org.apache.spark.sql.hive.thriftserver.HiveThriftServer2-1-MyCentOS.out