前提:hive/bin配置了环境变量。如果没有配置,cd到 hive目录下的bin里,再执行。
开启命令:
nohup hive --service hiveserver2 &
产生的日志:
默认在:
用户文件夹里
[root@master ~]# ll
total 80
-rw-------. 1 root root 1962 Nov 13 2016 anaconda-ks.cfg
-rw-r--r--. 1 root root 201 Mar 30 2017 ifcfg-etht
-rw-r--r--. 1 root root 44130 Nov 13 2016 install.log
-rw-r--r--. 1 root root 9201 Nov 13 2016 install.log.syslog
-rw------- 1 root root 6924 Oct 30 13:49 nohup.out
关闭命令:
1、查出Hiveserver进程:
ps -aux| grep hiveserver2
-------------------------
[root@master ~]# ps -aux| grep hiveserver2
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root 20670 0.0 0.0 103316 848 pts/4 R+ 12:53 0:00 grep hiveserver2
2、kill掉进程
kill -9 20670