前提: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 ?