HBase is based on pseudo-distributed cluster of structures

First, the basic configuration

  1.HBASE, relies on Hadoop, so you need to install a modified Hadoop, as well as the configuration file, format, start the service ... a little here, the details you can read my previous blog

  2. also need zookeeper, create a data file, modify the configuration file, start ... ditto

Second, build HBASE

  1. Upload and extract tar ready package, HBASE mounted, a prepared file folder / opt / install

  2.cd to install the root directory, create data / tmp temporary storage folder

    mkdir  -p  data/tmp

    Establish / hbase directory on hdfs

    bin/hdfs dfs -mkdir /hbase

  3. Modify the configuration file

    1.hbase-env.sh

1 # The java implementation to use.  Java 1.6 required.
2 export JAVA_HOME=/usr/java/jdk1.7.0_80
3 # Tell HBase whether it should manage it's own instance of Zookeeper or not.
4 export HBASE_MANAGES_ZK=false

    2.hbase-site.xml

 1 <configuration>
 2        <property >
 3            <name>hbase.tmp.dir</name>
 4            <value>/opt/install/hbase-0.98.6-hadoop2/data/tmp</value>
 5        </property>
 6        <property >
 7             <name>hbase.rootdir</name>
 8             <value>hdfs://[hostname]:8020/hbase</value>
 9         </property>
10         <property >
11             <name>hbase.cluster.distributed</name>
12             <value>true</value>
13         </property>
14         <property>
15             <name>hbase.zookeeper.quorum</name>
16             <value>[hostname zookeeper主节点]</value>
17         </property>
18 </configuration>

    3.regoinservers

1 [hostname DataNode]

  4. Note hbase lib in a jar, you need to install the same hadoop, zookeeper consistent version

  5. Start

1 bin/hbase-daemon.sh start master
2 bin/hbase-daemon.sh start regionserver

  6. Test

  web access: http: // [hostname]: 60010

  The screen can be as follows

  

 

 

 

 

 

    

Guess you like

Origin www.cnblogs.com/cmxbky1314/p/12158528.html