Hbase step by step 完全分布式安装

Step1: download and extract the packages: http://mirror.bit.edu.cn/apache/hbase/stable/

Step2: set the environment variable(not must, just easy to start):

export HBASE_HOME = PATH TO YOUR HBASE;
export PATH=$PATH:$HBASE_HOME/bin
View Code

Step3: Update file conf/hbase-env.sh

#Set related items if you need.
#Tell HBase whether it should manage it's own  of Zookeeper or not.
#如果我们自己已经有zookeeper集群,就把这个值设定为false
export HBASE_MANAGES_ZK=false
#如果你正确设置过JAVA_HOME,这里也可以省略:
export JAVA_HOME= JAVA PATH
#为了让你的Hbase找到Hadoop集群,需要设置:
export HBASE_CLASSPATH=$HADOOP_HOME/etc/hadoop

Step4:update file conf/hbase-site.xml

Sample content:

<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://192.168.1.110:9000/Hbase</value>
</property>
<property>
<name>hbase.cluster.distributed </name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2222</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>namenode,datanode01,datanode02</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/hadoop/zoo</value>
</property>
</configuration>

Change the value according your own cases.

Step5:change the regionservers:

namenode
datanode01
datanode0

You can change to your own node name.

Step6: copy the Hbase foler to other nodes;

scp -r hbase hadoop@datanode01:/home/hadoop/
scp -r hbase hadoop@datanode02:/home/hadoop/

Then you can start the Hbase and check the staus

start-hbase.sh

hbase shell

Status

Then you can do some simple experiment to browse the hbase.

http://hbase.apache.org/book/quickstart.html

posted on 2013-12-29 11:43  tneduts  阅读(745)  评论(6编辑  收藏  举报

导航