hbase - 安装(Windows)
下载hbase:
http://hbase.apache.org/downloads.html
http://mirror.bit.edu.cn/apache/hbase/2.2.3/hbase-2.2.3-bin.tar.gz
解压hbase:
修改配置文件:
(1)conf/hbase-env.cmd
set HBASE_MANAGES_ZK=true
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_181
set HBASE_CLASSPATH=E:\hbase-2.2.3\conf
(2)conf/hbase-site.xml
<configuration>
<property>
<name>hbase.master</name>
<value>localhost</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>file:///E:/temp/hbase/root</value>
</property>
<property>
<name>hbase.tmp.dir</name>
<value>E:/temp/hbase/tmp</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>E:/temp/hbase/zoo</value>
</property>
<!-- 外部ZK此处必须为true,不然hbase仍用自带的zk,若启动了外部的zookeeper,会导致冲突,hbase启动不起来 -->
<property>
<name>hbase.cluster.distributed</name>
<value>false</value>
</property>
<property>
<name>hbase.master.info.port</name>
<value>60010</value>
</property>
</configuration>
启动hbase:
cmd --> E:\hbase-2.2.3\bin>hbase master start
启动异常:
将 E:\hbase-2.2.3\lib\client-facing-thirdparty下的jar包拷至lib目录下
需要hadoop环境:
地址:https://github.com/srccodes/hadoop-common-2.2.0-bin,下载hadoop-common-2.2.0-bin-master.zip,解压缩到E:\hadoop-common-2.2.0-bin-master\bin。
新建环境变量HADOOP_HOME,值为E:\hadoop-common-2.2.0-bin-master
在path后添加:%HADOOP_HOME%\bin
删除E:\hadoop-common-2.2.0-bin-master\bin下hadoop.dll文件
重启启动
访问:http://localhost:60010/master-status
启动成功!