1.安装jdk(默认已安装好)
2.下载hbase2.0.5(地址:http://archive.apache.org/dist/hbase/2.0.5/),此处下载的是hbase-2.0.5-bin.tar.gz,此处使用wget http://archive.apache.org/dist/hbase/2.0.5/hbase-2.0.5-bin.tar.gz下载
3.解压hbase-2.0.5-bin.tar.gz 到/opt/bigdata目录
tar -zxvf hbase-2.0.5-bin.tar.gz -C /opt/bigdata
4.配置环境变量
vi /etc/profile
最后一行加上
export HBASE_HOME=/opt/bigdata/hbase-2.0.5
PATH=$PATH:$HBASE_HOME/bin
:wq退出
然后source /etc/profile让资源生效
5.打开HBASE_HOME的conf文件夹
cd $HBASE_HOME/conf
6.修改hbase-env.sh文件的jdk路径
vi hbase-env.sh
使用/命令搜索到JAVA_HOME将JAVA_HOME地址修改为你的jdk路径
7.修改hbase-site.xml的configuration里的内容
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:///home/testuser/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/testuser/zookeeper</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
<description>
Controls whether HBase will check for stream capabilities (hflush/hsync).
Disable this if you intend to run on LocalFileSystem, denoted by a rootdir
with the 'file://' scheme, but be mindful of the NOTE below.
WARNING: Setting this to false blinds you to potential data loss and
inconsistent system state in the event of process and/or node failures. If
HBase is complaining of an inability to use hsync or hflush it's most
likely not a false positive.
</description>
</property>
</configuration>
8.启动hbase
start-hbase.sh
9.访问webui页面
http://polo:16010(polo是你的主机名 此处也可以是ip地址如http://192.168.76.133:16010)