【HBase7】HBase伪分布式安装

【HBase七】HBase伪分布式安装

Hadoop2.5.2

HBase1.0.0

 

1.安装Hadoop

HBase数据存储在HDFS中,因此在安装HBase需要首先安装Hadoop

 

2. 安装HBase

2.1 下载HBase

http://mirror.bit.edu.cn/apache/hbase/hbase-1.0.0/hbase-1.0.0-bin.tar.gz

 

2.2 修改配置文件hbase-env.sh

export HBASE_MANAGES_ZK=true
export JAVA_HOME=/home/hadoop/software/jdk1.7.0_67
export HBASE_CLASSPATH=/home/hadoop/software/hbase-1.0.0/conf

 

2.3 修改配置文件hbase-site.xml

 

<configuration>
        <property>
                <name>hbase.cluster.distributed</name>
                <value>true</value>
        </property>
        <property>
                <name>hbase.rootdir</name>
                <value>hdfs://192.168.26.139:9000/hbase</value>
        </property>
</configuration>

 

3. 启动HBase

[hadoop@hadoop bin]$ ./start-hbase.sh 

 

4. HBase web console

http://192.168.26.139:16030

 

 
【HBase7】HBase伪分布式安装
 
【HBase7】HBase伪分布式安装
 

5. 启动HBase Shell

 

[hadoop@hadoop bin]$ ./hbase shell

 

6. 查看表,创建表,插入数据

6.1 查看表

hbase(main):001:0> list
TABLE                                                                                                                                      
my_table                                                                                                                                   
my_table2                                                                                                                                  
2 row(s) in 0.6760 seconds

=> ["my_table", "my_table2"]

 

 6.2 创建表