HBase——2.单机安装

1. 下载二进制文件
[root@node1 soft]# wget https://mirror.bit.edu.cn/apache/hbase/hbase-1.3.6/hbase-1.3.6-bin.tar.gz
[root@node1 soft]# tar xvf hbase-1.3.6-bin.tar.gz
2. 准备安装环境
[root@node1 soft]# mkdir /share/hbase /data/hbase /data/hbase/zookeeper -pv
[root@node1 soft]# mv hbase-1.3.6 /share/hbase/ 
[root@node1 soft]# cd /share/hbase/hbase-1.3.6/
[root@node1 hbase-1.3.6]#  mkdir /share/lnhome -pv
[root@node1 hbase-1.3.6]#  ln -sf  /share/hbase/hbase-1.3.6/ /share/lnhome/hbase
root@node1 hbase-1.3.6]# cd conf/
[root@node1 conf]# ls
hadoop-metrics2-hbase.properties  hbase-env.sh      hbase-site.xml          log4j.properties
hbase-env.cmd                     hbase-policy.xml  log4j-hbtop.properties  regionservers
3. 修改配置文件
[root@node1 conf]# cp hbase-site.xml hbase-site.xml.bak
[root@node1 conf]# cp hbase-env.sh hbase-env.sh.bak
[root@node1 conf]# vim hbase-env.sh
export JAVA_HOME=$JAVA_HOME 
export HBASE_MANAGES_ZK=true
[root@node1 conf]# pwd
/share/lnhome/hbase/conf
[root@node1 conf]# vim hbase-site.xml
        <property>
                <name>hbase.rootdir</name>
                <value>file:///data/hbase</value>
                <description>hbase存放数据目录 
                hbase.rootdir默认为/tmp/hbase-${user.name},这意味着每次重启系统都会丢失数据。</description>
        </property>

        <property>
                <name>hbase.zookeeper.property.dataDir</name>
                <value>/data/hbase/zookeeper</value>
                <description>ZooKeeper数据文件路径</description>
        </property>

        <property>
                <name>hbase.unsafe.stream.capability.enforce</name>
                <value>false</value>
    <description>
      Controls whether HBase will check for stream capabilities (hflush/hsync).
      Disable this if you intend to run on LocalFileSystem, denoted by a rootdir
      with the 'file://' scheme, but be mindful of the NOTE below.
      WARNING: Setting this to false blinds you to potential data loss and
      inconsistent system state in the event of process and/or node failures. If
      HBase is complaining of an inability to use hsync or hflush it's most
      likely not a false positive.
    </description>
  </property>
  <property>
    <name>hbase.zookeeper.property.clientPort</name>
    <value>2182</value>
</property>
</configuration>
4. 生成环境变量
[root@node1 conf]# vim /etc/profile
export HBASE_HOME=/share/lnhome/hbase 
export PATH=$HBASE_HOME/bin:$PATH
[root@node1 conf]# vim ~/.bashrc 
export HBASE_HOME=/share/lnhome/hbase 
export PATH=$HBASE_HOME/bin:$PATH
[root@node1 conf]# source /etc/profile ~/.bashrc
5. 启动测试
[root@node1 logs]# start-hbase.sh 
starting master, logging to /share/lnhome/hbase/logs/hbase-root-master-node1.out
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
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/share/hbase/hbase-1.3.6/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/share/hadoop/hadoop-2.7.2/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
[root@node1 logs]# jps
73027 NodeManager
73331 ResourceManager
74034 DFSZKFailoverController
74343 NameNode
20135 QuorumPeerMain
73945 JournalNode
73868 DataNode
76556 HMaster
76830 Jps
[root@node1 logs]# start-hbase.sh status
master running as process 76556. Stop it first.

http://node1:16010/在这里插入图片描述***————Blueicex 2020/3/12 21:05 blueice1980@126.com***

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值