Hbase 2.1.0 安装

环境准备

cd /usr/lib&&ln -s /opt/apps/hbase-2.1.0 hbase-current

# set the hbase home
export HBASE_HOME="/usr/lib/hbase-current"

# set hbase log dir
export HBASE_LOG_DIR="/data/bigdata/log/hadoop-hbase"

if [[ -n $HBASE_HOME ]]; then
  export PATH=$HBASE_HOME/bin:$PATH
fi

修改配置

hbase-site.xml

                                                                  
                                                                       
    hbase.zookeeper.quorum                                          
    master,node1,node2                                            
    The directory shared by RegionServers.                          
                                                                   
                                                                      
                                                                       
    hbase.zookeeper.property.dataDir                                
    /hbase/zk-data/zookeeper                                      
    Property from ZooKeeper config zoo.cfg.                         
    The directory where the snapshot is stored.                                  
                                                                   
                                                                      
                                                                       
    hbase.rootdir                                                   
    hdfs://master:9000/hbase                                      
    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) 
                                                                   
  


  hbase.unsafe.stream.capability.enforce
  false
                                                             
                                                                 

hbase-env.sh

# Tell HBase whether it should manage it's own instance of ZooKeeper or not.
# export HBASE_MANAGES_ZK=true
export HBASE_MANAGES_ZK=false

启动

hbase-daemon.sh  start master & (master)

hbase-daemon.sh  start regionserver & (all)

遇到问题

1.java.lang.NoClassDefFoundError: org/apache/htrace/SamplerBuilder

cp  $HBASE_HOME/lib/client-facing-thirdparty/htrace-core-3.1.0-incubating.jar $HBASE_HOME/lib/

你可能感兴趣的:(Hbase 2.1.0 安装)