hbase与zk的独立部署(standalone)

hbase版本:hbase-0.98.20-hadoop2(经测试发现1.*版本以上无法完成standalone部署)
zk:最新版

1、下载并解压habse
2、修改 conf下hbase-env.sh文件,添加下面两行
export HBASE_MANAGES_ZK=false
export JAVA_HOME=/usr/jdk/jdk7
3、修改conf下hbase-site.xml文件,在configuration标签中添加:

hbase.zookeeper.quorum
localhost
The directory shared by RegionServers.



hbase.zookeeper.property.dataDir
/opt/zookeeper-3.4.8/data
Property from ZooKeeper config zoo.cfg.
The directory where the snapshot is stored.



hbase.rootdir
file:///opt/hbase-0.98.20-hadoop2/data
The directory shared by RegionServers.



hbase.cluster.distributed
true
The mode the cluster will be in. Possible values are
  false: standalone and pseudo-distributed setups with managed Zookeeper
  true: fully-distributed with unmanaged Zookeeper Quorum (see hbase-env.sh)


4、测试hbase是否安装ok

添加habse命令软连接到bin中

ln -s /opt/hbase-1.1.5/bin/hbase /usr/local/bin/hbase.sh
ln -s /opt/hbase-0.98.20-hadoop2/bin/hbase-config.sh /usr/local/bin/hbase-config.sh

查看所有表记录

hbase shell
list

注意hbase.zookeeper.property.dataDir属性值为zk的数据位置
   hbase和zookeeper需要在同一台机器

你可能感兴趣的:(hbase与zk的独立部署(standalone))