1.正常安装hbse和hive,这里不再赘述。
2.修改hive-env.sh(可选)
# Set HADOOP_HOME to point to a specific hadoopinstall directory
HADOOP_HOME=/home/hadoop/app/hadoop-2.4.1
3.修改 hive-site.xml
<property>
<name>hive.querylog.location</name>
<value>/home/hadoop/app/hive/logs</value>
</property>
<property>
<name>hive.aux.jars.path</name>
<value>file:///home/hadoop/app/hive/lib/hive-hbase-handler-0.14.0.jar,file:///home/hadoop/app/hive/lib/hbase-protocol-0.96.2-hadoop2.jar,file:///home/hadoop/app/hive/lib/hbase-client-0.96.2-hadoop2.jar,file:///home/hadoop/app/hive/lib/hbase-common-0.96.2-hadoop2.jar,file:///home/hadoop/app/hive/lib/zookeeper-3.4.5.jar,file:///home/hadoop/app/hive/lib/guava-11.0.2.jar</value>
</property>
<property>
<name>hive.zookeeper.quorum</name>
<value>hadoopSlave1,hadoopSlave2</value>
</property>
!!!注意配置hive.aux.jars.path时<vlaue></value>里面的不能有空格和回车
4将配置文件中的包从hbse安装路径lib/下,复制到hive路径lib/下。
即将/home/hadoop/app/hbase/lib下的
hbase-protocol-0.96.2-hadoop2.jar,
hbase-client-0.96.2-hadoop2.jar,
hbase-common-0.96.2-hadoop2.jar,
zookeeper-3.4.5.jar(若hive/lib下有其他的,删除掉)
复制到/home/hadoop/app/hive/lib下
5.以集群的方式启动hive
hive -hiveconf hbase.master=hadoopMaster(你的hbase的hmaster地址):6000
完整安装见http://www.itnose.net/detail/6065872.html