HBase的下載、安裝與配置


聲明:作者原創,轉載注明出處。

作者:帥氣陳吃蘋果

(一)安裝

下載、解壓:

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

tar -zxvf hbase-1.3.1.tar.gz -C /root/hadoop/

(二)配置

cd $HBASE_HOME/conf

vim hbase-site.xml
1)單機模式
<!-- 指定HRegion服務器的位置,即數據存放位置  -->
<property>
    <name>hbase.rootdir</name>
    <value>file:///tmp/hbase-${user.name}/hbase</value>
</property>
2)偽分布式模式
<!-- 指定HRegion服務器的位置,即數據存放位置  -->
<property>
    <name>hbase.rootdir</name>
    <value>hdfs://localhost:9000/hbase</value>
</property>
<!-- 指定HLog和Hfile的副本個數  -->
<property>
    <name>dfs.replication</name>
    <value>1</value>
</property>
3)完全分布式模式
<!--  指定HRegion服務器的位置,即數據存放位置 -->
<property>
    <name>hbase.rootdir</name>
    <value>hdfs://master:9000/hbase</value>
</property>
<!-- 指定HBase運行模式,false表示單機模式或偽分布式,true表示完全分布式模式  -->
<property>
    <name>hbase.clister.distributed</name>
    <value>true</value>
</property>
<!-- 指定master位置  -->
<property>
    <name>hbase.master</name>
    <value>hdfs://master:60000</value>
</property>
<!--  指定zookeeper集群 -->
<property>
    <name>hbase.zookeeper.quorum</name>
    <value>master,slave1,slave2</value>
</property>

(三)運行

cd $HBASE_HOME/bin

1)單機模式
start-hbase.sh
2)偽分布式模式
start-dfs.sh

start-hbase.sh
3)完全分布式模式
start-dfs.sh

zookeeper.sh start

start-hbase.sh

最后,歡迎指正。喜歡的話,點個贊唄,請你吃蘋果。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM