1、启动命令
#!/bin/bash nohup hive --service metastore >> $HIVE_HOME/logs/metasotre.log 2>&1 & nohup hive --service hiveserver2 >> $HIVE_HOME/logs/hiveserver.log 2>&1 &
2、停止命令
#!/bin/bash process="hive" PID=$(ps x | grep $process | grep '/bin/java' | grep -v grep | awk '{print $1}') ps -ef | grep $process | grep '/bin/java' | grep -v grep | awk '{print $2}' | xargs kill -9标签:bin,grep,logs,启动,process,Hive,命令,停止,hive From: https://www.cnblogs.com/yeyuzhuanjia/p/17761825.html