设为首页 加入收藏

TOP

CentOS7HBase伪分布式安装配置
2019-03-29 01:44:09 】 浏览:54
Tags:CentOS7HBase 分布式 安装 配置
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_22027637/article/details/82177377

1.下载

wget https://archive.apache.org/dist/hbase/1.2.4/hbase-1.2.4-bin.tar.gz

2. 解压

tar zxvfhbase-1.2.4-bin.tar.gz -C /app

3.配置

cd/app/hbase-1.2.4/conf

拷贝Hadoop的hdfs-site.xml 、core-site.xml的到当前目录

cp /app/hadoop-2.7.3/etc/hadoop/hdfs-site.xml .

cp /app/hadoop-2.7.3/etc/hadoop/core-site.xml .

vi hbase-env.sh

export JAVA_HOME=/app/jdk1.8.0_181

## 注释
# Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8+
#export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
#export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"

vi hbase-site.xml

<configuration>
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://localhost:9000/hbase</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/tmp/hadoop_data/zookeeper</value>
    </property>
    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
    </property>
</configuration>

启动

cd ../bin

./start-hbase.sh

./hbase shell

[root@localhost bin]# ./start-hbase.sh 
localhost: starting zookeeper, logging to /app/hbase-1.2.4/bin/../logs/hbase-root-zookeeper-localhost.localdomain.out
starting master, logging to /app/hbase-1.2.4/bin/../logs/hbase-root-master-localhost.localdomain.out
starting regionserver, logging to /app/hbase-1.2.4/bin/../logs/hbase-root-1-regionserver-localhost.localdomain.out
[root@localhost bin]# jps -m
18816 SecondaryNameNode
20176 Jps -m
18627 DataNode
19844 HRegionServer -D hbase.regionserver.port=16201 -D hbase.regionserver.info.port=16301 start
18533 NameNode
19692 HQuorumPeer start
19757 HMaster start
[root@localhost bin]# ./hbase shell
2018-08-28 20:59:28,848 WARN  [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.2.4, r67592f3d062743907f8c5ae00dbbe1ae4f69e5af, Tue Oct 25 18:10:20 CDT 2016

hbase(main):001:0> status
1 active master, 0 backup masters, 1 servers, 0 dead, 2.0000 average load

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇HBase: Coprocessor Endpoint :s.. 下一篇hbase 与传统数据库的区别

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目