单机HBase

http://www.apache.org/dyn/closer.cgi/hbase/
https://mirror.bit.edu.cn/apache/hbase/
https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/
wget https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/hbase-1.3.6/hbase-1.3.6-bin.tar.gz
tar zxf hbase-1.3.6-bin.tar.gz
mv hbase-1.3.6 hbase

sudo vi /etc/profile 添加

export HBASE_HOME=/home/user/hbase
export PATH=$HBASE_HOME/bin:$PATH

source /etc/profile
hbase version
HBase 1.3.6

Source code repository git://Sakthis-MacBook-Pro-2.local/Users/sakthi/dev/hbase revision=806dc3625c96fe2cfc03048f3c54a0b38bc9e984
Compiled by sakthi on Tue Oct 15 01:55:41 PDT 2019
From source with checksum d587feefff2057a2e5001da5db4a6fac

JDK要配好java -version

vi /home/user/hbase/conf/hbase-env.sh

export JAVA_HOME=/home/user/miku/jdk
export HBASE_MANAGES_ZK=true

vi /home/user/hbase/conf/hbase-site.xml

<configuration>
    <property>
        <name>hbase.rootdir</name>
        <value>file:/home/user/miku/data</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>file:/home/user/miku/data/zookeeper</value>
    </property>
</configuration>

/home/user/hbase/bin/start-hbase.sh # stop-hbase.sh 停止
hbase shell

status
create 'table1','field1'
t1 = get_table('table1')
t1.put 'row1', 'field1:qualifier1', 'value1'
t1.scan

参考:
https://blog.csdn.net/ouzhuangzhuang/article/details/89876152

标签: none

添加新评论