1.可以直接在hive目录下开启hiveserver2,但要在命令面前加入 nohup免挂断
nuhub bin/hiveserver2
避免关闭连接的时候,把该进程挂断了
nohup bin/hiverserver2 1>/dev/null
1表示进程描述符
0:标准输入文件 1:标准输出文件 2:标准错误文件
上述命令意为 将进程的标准输出文件写到路径dev/null
还可:
nohup bin/hiverserver2 1>/dev/null 2>&1 &
2 和1 一样存到路径
nohup bin/hiverserver2 >/dev/null 2>&1 &
1可省略,默认1