HBase安装配置

HBase安装配置

1. 在某一台上解压hbase的压缩文件

tar -zxvf hbase-1.2.3-bin.tar.gz

2. 配置添加环境变量:

#hbase

export HBASE_HOME=/usr/tools/hbase-1.2.3

export PATH=$PATH:$HBASE_HOME/bin 

使环境变量生效

source /etc/profile

 

3. 进入hbaseconf目录,需要修改三个文件:hbase-env.sh、hbase-site.xml和regionservers

其中hbase-env.sh中,在文档的十多行位置处添加:

# The java implementation to use.  Java 1.7+ required.

# export JAVA_HOME=/usr/java/jdk1.6.0/

export JAVA_HOME=/usr/tools/jdk1.8.0_73

# Extra Java CLASSPATH elements.  Optional.

# export HBASE_CLASSPATH=

然后在后面添加:

# Seconds to sleep between slave commands.  Unset by default.  This

# can be useful in large clusters, where, e.g., slave rsyncs can

# otherwise arrive faster than the master can service them.

# export HBASE_SLAVE_SLEEP=0.1

 

# Tell HBase whether it should manage it's own instance of Zookeeper or not.

export HBASE_MANAGES_ZK=false

 

hbase-site.xml中

        

                hbase.zookeeper.quorum

                centos128,centos129,centos130

                The directory shared by RegionServers.

        

        

                hbase.zookeeper.property.dataDir

                /usr/tools/hbase-1.2.3/zookeeperdata

                Property from ZooKeeper config zoo.cfg.

                The directory where the snapshot is stored.

                

        

        

                hbase.tmp.dir

                /usr/tools/hbase-1.2.3/tmpdata

        

        

                hbase.rootdir

                hdfs://centos128: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)

                

        

regionservers文件中添加各个从属服务器的ip或者hostname

 

centos128

centos129

centos130

 

4. 保存后分别把hbase的整个文件夹拷贝到其他服务器:

 

scp -r /usr/tools/hbase-1.2.3 root@centos129:/usr/tools/

scp -r /usr/tools/hbase-1.2.3 root@centos130:/usr/tools/

 

5. 在hadoopnamenode节点上启动hbase服务

start-hbase.sh

 

启动后:jps

HRegionServer

HMaster

子节点

HRegionServer

 

启动顺序

Hadoop-hdfs-------hadoop-yarn------zookeeper------hbase

你可能感兴趣的:(HBase安装配置)