zoukankan      html  css  js  c++  java
  • hbase

    wget tar 包

    去官网下吧,我这里 已经没了。。。
    wget hbase-xxx.tar.gz -C /opt/module/
    

    从 hadoop etc/hadoop/下拷贝 两份配置文件到 hbase conff 下

    /root/hbase-1.2.8/conf
    
    [root@master conf]# cp /opt/modules/hadoopstandalone/hadoop-2.8.4/etc/hadoop/core-site.xml .
    [root@master conf]# cp /opt/modules/hadoopstandalone/hadoop-2.8.4/etc/hadoop/hdfs-site.xml .
    

    1、 修改 hbase-env.sh

    export JAVA_HOME=/home/yli/jdk1.8.0_131
    
    由于是 1.8  jdk 注释掉 两行
    #export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=256m"
    #export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=256m"
    
    保留 zookeeper 管理 hbase
    # export HBASE_MANAGES_ZK=true
    

    2、 修改 hbase-site.xml

    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
    <!--
    /**
     *
     * Licensed to the Apache Software Foundation (ASF) under one
     * or more contributor license agreements.  See the NOTICE file
     * distributed with this work for additional information
     * regarding copyright ownership.  The ASF licenses this file
     * to you under the Apache License, Version 2.0 (the
     * "License"); you may not use this file except in compliance
     * with the License.  You may obtain a copy of the License at
     *
     *     http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    -->
    <configuration>
    <property>
        <!--hbase.rootdir,HDFS的入口地址,地址和端口要和你的hadoop配置一样(core-site.xml中的 <name>fs.default.name</name>),所有节点公用地址-->
        <name>hbase.rootdir</name>
        <value>hdfs://master:9000/hbase</value>
    </property>
    
    <property>  
        <!--hbase.zookeeper.property.dataDir , zookeeper 保持信息的文件,默认为/tmp 重启会丢失-->
        <name>hbase.zookeeper.property.dataDir</name>  
        <value>/opt/modules/zookeeperdataDir</value>  
    </property> 
    <property >
        <name>hbase.cluster.distributed</name>
        <value>true</value>
        <description>The mode the cluster will be in. Possible values are
          false for standalone mode and true for distributed mode.  If
          false, startup will run all HBase and ZooKeeper daemons together
          in the one JVM.</description>
      </property>
    </configuration>
    
    

    3 进入 hbase bin 目录下 执行

    ./start-hbase.sh
    jps 查看下
    

    4 进入 hbase shell

    ./hbase shell
    
    
    如果有来生,一个人去远行,看不同的风景,感受生命的活力。。。
  • 相关阅读:
    Python实现常用的数据结构
    Python实现一些常用排序算法
    python实现简单排序算法
    Django学习-25-图片验证码实例
    Django学习-24-Ajax
    Django学习-23-ModelForm
    Django学习-22-Form
    Django学习-21-表关系参数
    Django学习-20-信号
    用"再生龙"Clonezilla 来克隆Linux系统
  • 原文地址:https://www.cnblogs.com/Frank99/p/9953664.html
Copyright © 2011-2022 走看看