完全分布式
按前面的步骤安装好hbase,配好环境变量。
确保hbase version显示正常信息。
(1)hbase-env.sh修改内容:
export JAVA_HOME=/home/duck/software/jdk
1
export HBASE_MANAGES_ZK=false
1
(2)hbase-site.xml修改内容:
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://Cloud01:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<!-- 0.98后的新变动,之前版本没有.port,默认端口为60000 -->
<property>
<name>hbase.master.port</name>
<value>16000</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>Cloud01:2181,Cloud03:2181,Cloud04:2181</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/duck/software/zookeeper/zkData</value>
</property>
</configuration>
(3)regionservers:
Cloud03
Cloud04
1
2
(4)软连接hadoop配置文件到hbase:
ln -s /home/duck/software/hadoop/core-site.xml /home/duck/software/hbase/conf/core-site.xml
1
(5)HBase远程发送到其他集群
scp -r /home/duck/software/hbase duck@192.168.244.138:~/
1
(6)启动HDFS和zookeeper
start-dfs.sh
bin/zkServer.sh start
1
2
3
(7)启动HBase
start-hbase.sh