Centos7安装hbase1.6.0

Hbase1.6.0安装配置

zookeeper安装配置

1.hbase依赖于zookeeper,使用前需要安装zookeeper

# 下载
wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz
# 解压
tar -zxvf zookeeper-3.4.14.tar.gz
# 重命名
mv zookeeper-3.4.14 zookeeper

2.配置

#内部配置可以不变,仅需拷贝一份
cd zookeeper/conf
cp zoo_sample.cfg zoo.cfg

3.启动zookeeper

cd zookeeper/bin
./zkServer.sh start

hbase安装配置

1.下载解压

wget https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/1.6.0/hbase-1.6.0-bin.tar.gz
tar -zxvf hbase-1.6.0-bin.tar.gz
mv hbase-1.6.0-bin hbase

2.配置

cd hbase/conf
vim hbase-env.sh
# 编辑hbase-env.sh文件,将一项参数改为false。即使用外部的zookeeper
export HBASE_MANAGES_ZK=false

vim hbase-site.xml
# 编辑hbase配置文件,写入以下内容
# hbase.zookeeper.quorum项可以暂不用配置,因为是伪分布式

  
    hbase.rootdir
    hdfs://hadoop:9000/hbase
  
  
    hbase.zookeeper.property.dataDir
    /home/hadoop/hbase/data/zookeeper
  
  
    hbase.cluster.distributed
    true
  
  
    hbase.unsafe.stream.capability.enforce
    false
  

3.启动

cd hbase/bin
./start-hbase.sh
# 可以通过jps命令查看是否成功启动
# 92001 HMaster(代表成功启动)
# 92512 Jps
# 92184 HRegionServer
# 39610 RunJar
# 38475 NameNode
# 39421 NodeManager
# 38638 DataNode
# 38846 SecondaryNameNode
# 39102 ResourceManager

# 使用hbase shell
./hbase shell

报错警告

1.

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0

解决办法:

vim hbase/conf/hbase-env.sh
# 将以下两行注释掉
export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=256m"
export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=256m"

你可能感兴趣的:(linux,hadoop,hbase,大数据)