hbase-0.94.2安装

1.先前需要安装zookeeper,参考zookeeper的安装

2.下载,解压,hbase-0.94.2.tar.gz,我做了chmod 777 hbase-0.9.4.2

3.配置jdk,hbase-env.sh

export JAVA_HOME=/home/ganliang/study_app/jdk1.6.0_34
4.配置hbase-site.xml

<configuration>
        <property>
            <name>hbase.cluster.distributed</name>
            <value>true</value>
        </property>
        <property>
                <name>hbase.rootdir</name>
                <value>hdfs://localhost:9000/hbase</value>
          </property>
          <property>
                <name>dfs.replication</name>
                <value>1</value>
          </property>
</configuration>

 

5.先启动zookeeper,sudo bin/zkServer.sh start

6.启动:hbase-0.94.2/bin/hbase shell,此前要进行bin/hadoop dfsadmin -safemode leave

ganliang@ganliang-laptop:/home$ hbase-0.94.2/bin/hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.94.2, r1395367, Sun Oct  7 19:11:01 UTC 2012

hbase(main):001:0> list
TABLE                                                                                                                                                                 
0 row(s) in 0.6320 seconds

hbase(main):002:0>

hbase(main):003:0* create 't1',{NAME => 'f1'}
0 row(s) in 1.1340 seconds
hbase(main):005:0* list
TABLE                                                                                                                                                                 
t1                                                                                                                                                                    
1 row(s) in 0.0480 seconds

TABLE                                                                                                                                                                 
t1                                                                                                                                                                    
1 row(s) in 0.0120 seconds

你可能感兴趣的:(hadoop,运行示例,hbase安装)