Search code examples
phphadoophivethriftbigdata

Start and stop hiveserver2


I connect to hive by php thought thrift so I want start hiveserver2 but if I using hive command to start hiveserver2

hive --service hiveserver2 --hiveconf hive.server2.thrift.port=10000 --hiveconf hive.root.logger=INFO,console

I always need stop hiveserver2 by Ctrl+C

I find a new way by start by service command I was try

service hive-server2 start
service hiveserver2 start

but I get error: hiveserver2: unrecognized service

Can anyone help me how to start it with service command?


Solution

  • You can always run hiveserver2 in background by below command

    nohup hive --service hiveserver2 &