【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>
Zookeeper正常启动
[hadoop@hadoop102 zookeeper-3.4.10]$ bin/zkServer.sh start
[hadoop@hadoop103 zookeeper-3.4.10]$ bin/zkServer.sh start
[hadoop@hadoop104 zookeeper-3.4.10]$ bin/zkServer.sh start
Hadoop正常部署
[hadoop@hadoop102 hadoop-2.7.2]$ sbin/start-dfs.sh
[hadoop@hadoop103 hadoop-2.7.2]$ sbin/start-yarn.sh
解压HBase到指定目录
[hadoop@hadoop102 software]$ tar -zxvf hbase-1.3.1-bin.tar.gz -C /opt/module
HBase文件配置
hbase-env.sh
export JAVA_HOME=/opt/module/jdk1.8.0_144
export HBASE_MANAGES_ZK=false
JDK1.8需要注释
#export HBASE_MASTER_OPTS。。。。
#export HBASE_REGIONSERVER_OPTS。。。
hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://hadoop102:9000/hbase</value>
</property>
<!--指示HBase以分布式模式运行-->
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<!--配置ZooKeeper-->
<property>
<name>hbase.zookeeper.quorum</name>
<value>hadoop102,hadoop103,hadoop104</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/opt/module/zookeeper-3.4.10/zkData</value>
</property>
<!--与主服务器时差-->
<property>
<name>hbase.master.maxclockskew</name>
<value>180000</value>
</property>
</configuration>
regionservers:
hadoop102
hadoop103
hadoop104
软连接hadoop配置文件到hbase:
[hadoop@hadoop102 module]$ ln -s /opt/module/hadoop-2.7.2/etc/hadoop/core-site.xml /opt/module/hbase/conf/core-site.xml
[hadoop@hadoop102 module]$ ln -s /opt/module/hadoop-2.7.2/etc/hadoop/hdfs-site.xml /opt/module/hbase/conf/hdfs-site.xml
HBase远程发送到其他集群
[hadoop@hadoop102 module]scp -r hbase/ @hadoop103:/opt/module
[hadoop@hadoop102 module]scp -r hbase/ @hadoop104:/opt/module
HBase启动
[hadoop@hadoop102 hbase]$ bin/start-hbase.sh
查看HBase页面:http://hadoop102:16010
来源:oschina
链接:https://my.oschina.net/u/4427158/blog/3149308