51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

HBASE安装与配置

本帖安装版本为hbase2.0.0

下载地址:https://archive.apache.org/dist/hbase/

解压tar包

|-----------|--------------------------------------------------------------| | 1 | tar -zvxf hbase-2.0.0-bin.tar.gz -C /export/servers/ |

配置环境变量

|---------------|-----------------------------------------------------------------------------------------------------| | 1 2 3 | #HBASE_HOME export HBASE_HOME=/export/servers/hbase-2.0.0 export PATH=$PATH:$HBASE_HOME/bin |

刷新配置

|-----------|-----------------------------| | 1 | source /etc/profile |

修改配置

|-----------|---------------------------------------------| | 1 | cd /export/servers/hbase-2.0.0/conf |

配置hbse-env.sh三个地方

修改成自己jdk的路径

![image-20220808083620773](F:\program Files(x86)\typora-img\image-20220808083620773.png)

![image-20220808083715349](F:\program Files(x86)\typora-img\image-20220808083715349.png)

hbase-site.xml配置文件中添加以下内容

|------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | <configuration> <property> <name>hbase.tmp.dir</name> <value>/export/servers/hbase-2.0.0/tmp</value> </property> <!-- 设置HRegionServers共享目录。定义hbase.rootdir参数时HDFS文件系统的主机名和端口号必须与Hadoop的配置文> 件core-site.xml中fs.default.name参数的配置一致--> <property> <name>hbase.rootdir</name> <value>hdfs://master:9000/hbase</value> <description>Hbase data director</description> </property> <!-- 开启分布式模式 --> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <!-- 设置HMaster的rpc端口, 由于采用的是HA模式,这里只写端口就可以了,不需要再写主机名--> <property> <name>hbase.master.port</name> <value>60000</value> </property> <!-- 对比参考 <property> <name>hbase.master</name> <value>hdfs://master:60000</value> </property> --> <!-- 设置HMaster的http web console端口 --> <property> <name>hbase.master.info.port</name> <value>16010</value> </property> <!--zookeeper设置,依赖zookeeper集群设置--> <!--zookeeper集群信息设置--> <property> <name>hbase.zookeeper.quorum</name> <value>master,slave1,slave2</value> </property> <!--zookeeper端口--> <property> <name>hbase.zookeeper.property.clientPort</name> <value>2181</value> </property> <!--请参考zookeeper配置文件zoo.cfg中dataDir的值 --> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/export/data/zookeeper/zkdata</value> </property> </configuration> |

配置regionservers文件

|---------------|------------------------------| | 1 2 3 | master slave1 slave2 |

启动

启动hadoop集群

|-----------|----------------------| | 1 | start-all.sh |

逐个节点启动zookeeper

|-----------|---------------------------| | 1 | zkServer.sh start |

启动HBASE

|-----------|------------------------| | 1 | start-hbase.sh |

正常启动进程图

![image-20220808084854340](F:\program Files(x86)\typora-img\image-20220808084854340.png)

浏览器输入https://master:16010/master-status

![image-20220808085009351](F:\program Files(x86)\typora-img\image-20220808085009351.png)

关闭hbase顺序

|-----------------------|----------------------------------------------------------------------------------| | 1 2 3 4 5 6 7 | staop-hbase.sh #逐个节点关闭zookeeper zkServer.sh stop #关闭hadoop集群 stop-all.sh |

赞(0)
未经允许不得转载:工具盒子 » HBASE安装与配置