忽略hadoop的安装
1、官网下载hbase,注意区分类型,src 还是bin,src包 需要自行编译
wget https://www.apache.org/dyn/closer.lua/hbase/2.1.3/hbase-2.1.3-bin.tar.gz
2、解压hbase
tar -zxvf hbase-2.1.3-bin.tar.gz
3、设置环境变量
export HBASE_HOME=/data/hbase-2.0.4
export PATH=$PATH:$HBASE_HOME/bin
4、修改 hbase-env.sh
#cd conf
#vi hbase-env.sh
设置jdk、zookeeper(外部的zookeeper,不是hbase自带的)
#jdk
export JAVA_HOME=/data/jdk/
#修改zk
export HBASE_MANAGES_ZK=false
5、修改 hbase-site.xml
#vi hbase-site.xml
如下配置
<configuration>
<property>
<name>hbase.rootdir</name>
#<value>file:///data/hbase-2.0.4/demo</value>
#连接hdfs
<value>hdfs://localhost:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost:2185</value>
</property>
<property>
<name>zookeeper.znode.parent</name>
<value>/hbase</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
</configuration>
6、启动hbase
bin/start-hbase.sh
7、查看是否启动成功
jps
8、shell进入hbase
bin/hbase shell