HBase安装与验证

在某一台上解压hbase的压缩文件,如在192.168.102.128

tar –zxvf hbase-1.2.0-bin.tar.gz

配置添加环境变量:

#hbase
export HBASE_HOME=/usr/tools/hbase-1.2.0
export PATH=$PATH:$HBASE_HOME/bin

使环境变量生效

source /etc/profile

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

1、其中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

2、hbase-site.xml中

<configuration>
        <property>
                <name>hbase.zookeeper.quorum</name>
                <value>node4,node5,node6</value>
                <description>The directory shared by RegionServers.</description>
        </property>
        <property>
                <name>hbase.zookeeper.property.dataDir</name>
                <value>/opt/module/hbase/hbase-1.2.3/zookeeperdata</value>
                <description>Property from ZooKeeper config zoo.cfg.
                The directory where the snapshot is stored.
                </description>
        </property>
        <property>
                <name>hbase.tmp.dir</name>
                <value>/opt/module/hbase/hbase-1.2.3/tmpdata</value>
        </property>
        <property>
                <name>hbase.rootdir</name>
                <value>hdfs://node4:9000/hbase</value>
                <description>The directory shared by RegionServers.</description>
        </property>
        <property>
                <name>hbase.cluster.distributed</name>
                <value>true</value>
                <description>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)
                </description>
</property>
</configuration>

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

node4
node5
node6

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

scp /usr/tools/hbase-1.2.0 root@node5: /usr/tools/
scp /usr/tools/hbase-1.2.0 root@node6: /usr/tools/

在hadoop的namenode节点上启动hbase服务

start-hbase.sh

注意:启动顺序

Hadoop-hdfs(sbin/start-dfs.sh)-------》hadoop-yarn(sbin/start-yarn.sh)------》zookeeper(zkServer.sh start)------》hbase(start-hbase.sh)

启动后:

jps
主节点
HRegionServer
HMaster

子节点

HRegionServer

可以访问端口16010:

node4:16010查看

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AllenGd

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值