1.1、下载 http://archive.apache.org/dist/hbase/2.1.1/
1.2、自带zookeeper-3.4.13
1.3、配置hbase环境变量
vim /etc/profile
export HBASE_HOME=/usr/local/big_data/hbase/hbase/hbase-2.1.1
PATH=$ZOOKEEPER_HOME/bin:$JAVA_HOME/bin:$HBASE_HOME/bin:$HADOOP_HOME/bin
source /etc/profile
.............省了
2.1、vim hbase-env.sh
# 环境变量
export JAVA_HOME=/usr/local/jdk1.8.0_172
export HBASE_PID_DIR=/usr/local/big_data/hbase/hbase/pids
# 为true表示使用自带的zookeeper
export HBASE_MANAGES_ZK=false
2.2、vim conf/hbase-site.xml
2.3、vim regionservers 从节点的列表(此处不用)
2.4、vim backup-masters standby 和master节点。如果没有自己创建。在文件中放入备份主节点的列表(以后一个主机名)(此处不用)
2.5、复制 hbase-2.1.3/lib/client-facing-thirdparty/htrace-core-3.1.0-incubating.jar到
hbase-2.1.3/lib目录下
2.6、启动:(hbase的安装没有初始化操作) 启动之前确保hadoop 和zk启动正常
start-hbase.sh
2.7、验证
1、使用 jps查看进程HMaster 是否正常
如果按照要求,某个节点缺少了某个进程, 使用以下命令启动:
hbase-daemon.sh start master -- HMaster
hbase-daemon.sh start regionserver -- HRegionServer
2、查询web ui
http://ip:16011/master-status
------------------------------------------------------------------------安装问题------------------------------------------------------------------------
1、安装出现类找不到
java.lang.NoClassDefFoundError: org/apache/htrace/SamplerBuilder
复制 hbase-2.1.3/lib/client-facing-thirdparty/htrace-core-3.1.0-incubating.jar到
hbase-2.1.3/lib目录下
2、出现以下异常:
java.lang.IllegalStateException: The procedure WAL relies on the ability to hsync for proper operation during component failures, but the underlying filesystem does not support doing so. Please check the config value of 'hbase.procedure.store.wal.use.hsync' to set the desired level of robustness and ensure the config value of 'hbase.wal.dir' points to a FileSystem mount that can provide it.
hbase-site.xml增加配置
官方安装:
http://hbase.apache.org/book.html#quickstart