解压

[atguigu@hadoop102 software]$ tar -zxvf hbase-1.3.1-bin.tar.gz -C /opt/module


修改配置文件

hbase-env.sh

  1. export JAVA_HOME=/opt/module/jdk1.8.0_144
  2. export HBASE_MANAGES_ZK=false

hbase-site.xml

  1. <configuration>
  2. <property>
  3. <name>hbase.rootdir</name>
  4. <value>hdfs://hadoop102:9000/hbase</value>
  5. </property>
  6. <property>
  7. <name>hbase.cluster.distributed</name>
  8. <value>true</value>
  9. </property>
  10. <!-- 0.98后的新变动,之前版本没有.port,默认端口为60000 -->
  11. <property>
  12. <name>hbase.master.port</name>
  13. <value>16000</value>
  14. </property>
  15. <property>
  16. <name>hbase.zookeeper.quorum</name>
  17. <value>hadoop102:2181,hadoop103:2181,hadoop104:2181</value>
  18. </property>
  19. <property>
  20. <name>hbase.zookeeper.property.dataDir</name>
  21. <value>/opt/module/zookeeper-3.4.10/zkData</value>
  22. </property>
  23. </configuration>

regionservers

改成集群的hostname

hadoop102
hadoop103
hadoop104

软连接hadoop配置文件

ln -s /opt/module/hadoop-2.7.2/etc/hadoop/core-site.xml  
/opt/module/hbase/conf/core-site.xml

ln -s /opt/module/hadoop-2.7.2/etc/hadoop/hdfs-site.xml 
/opt/module/hbase/conf/hdfs-site.xml

分发

xsync hbase/

启动停止

bin/start-hbase.sh

bin/stop-hbase.sh

访问

http://hadoop102:16010