阿里云轻量型服务器在 Hadoop2.7.x 伪分布式环境下安装配置 HBASE1.2.x
2020-02-04 07:30
387 查看
阿里云轻量级服务器在 Hadoop2.7.3 伪分布式环境下安装配置 HBASE1.2.4
HBASE简介
HBASE下载与解压
下载地址:https://archive.apache.org/dist/hbase/1.2.4/hbase-1.2.4-bin.tar.gz
HBASE各版本地址:https://archive.apache.org/dist/hbase
可使用wget命令来下载:
hadoop@ubuntu: wget https://archive.apache.org/dist/hbase/1.2.4/hbase-1.2.4-bin.tar.gz
使用tar命令解压到指定路径:
hadoop@ubuntu: sudo tar -zxvf hbase-1.2.4-bin.tar.gz -C /usr/
修改hbase-1.2.4文件夹的权限
hadoop@ubuntu: sudo chown -R hadoop:hadoop /usr/hbase-1.2.4
修改HBASE配置文件
修改hbase-env.sh文件:
hadoop@ubuntu:/usr/hbase-1.2.4/conf$ sudo vi hbase-env.sh
添加JAVA_HOME ,并注释掉部分内容(因为我们使用java1.8及以上版本):
# The java implementation to use. Java 1.7+ required. export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/ # Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8+ ###export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m" ###export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
修改hbase-site.xml文件:
hadoop@ubuntu:/usr/hbase-1.2.4/conf$ sudo vi hbase-site.xml
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- /** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ <configuration> <property> <name>hbase.rootdir</name> <value>hdfs://ubuntu:9000/hbase</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/usr/tmp/zookeeper</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> </configuration>
修改regionservers
hadoop@ubuntu:/usr/hbase-1.2.4/conf$ sudo vi regionservers
添加 localhost 即可。
配置环境变量
hadoop@ubuntu:/usr/hbase-1.2.4/conf$ vi ~/.bashrc
在末尾处添加以下内容:
export HBASE_HOME=/usr/hbase-1.2.4 export PATH=$HBASE_HOME/bin:$PATH
将修改应用于系统:
hadoop@ubuntu:/usr/hbase-1.2.4/conf$ source ~/.bashrc
启动服务
注意启动顺序,先启动 hadoop
hadoop@ubuntu:/usr/hbase-1.2.4/conf$ start-all.sh
再启动 hbase
hadoop@ubuntu:/usr/hbase-1.2.4/conf$ start-hbase.sh
查看是否启动成功
hadoop@ubuntu:/usr/hbase-1.2.4/conf$ jps
出现以下内容即启动成功
hadoop@ubuntu:/usr/hbase-1.2.4/conf$ jps30354 Jps 3763 SecondaryNameNode 4052 NodeManager 4661 HQuorumPeer 4856 HRegionServer 4728 HMaster 3917 ResourceManager 3405 NameNode 3566 DataNode
下面可进入 hbase shell 查看,输入 hbase shell,出现hbase工作台
hadoop@ubuntu:/usr/hbase-1.2.4/conf$ hbase shell HBase Shell; enter 'help<RETURN>' for list of supported commands. Type "exit<RETURN>" to leave the HBase Shell Version 1.2.4, r67592f3d062743907f8c5ae00dbbe1ae4f69e5af, Tue Oct 25 18:10:20 CDT 2016 hbase(main):001:0> hadoop@ubuntu:/usr/hbase-1.2.4/conf$
小结
HBASE 的配置与 hadoop 相比难度还是小了很多的,但如果 hadoop 没有配置好,在使用HBASE时将会出现一系列出乎意料的问题。
附上一篇阿里云安装 hadoop2.7.x 的指南,希望能对读者提供帮助:https://blog.csdn.net/qq_44880708/article/details/102909544
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- 阿里云服务器安装配置Hadoop2.7.5+Spark2.2.1伪分布式环境
- hadoop2.7 集群分布式环境 Hbase的安装
- 阿里云服务器上HBase环境配置及基本操作命令实践(含Zookeeper安装)
- hadoop学习(8):HBase-1.2伪分布式安装配置
- 【心血之作】linux虚拟机下安装配置Hadoop(完全分布式)生态环境(hadoop2.2.0,HBase0.98,Hive0.13(连接oracle),sqoop1.4.4(连接oracle)
- Ubuntu16.04下伪分布式环境搭建之hadoop2.6.0、jdk1.7、Hbase0.98的安装与配置
- 伪分布式环境搭建之hadoop、Hbase的安装与配置
- hbase单机和分布式安装配置并整合到hadoop集群上
- 初次安装和配置阿里云服务器环境是怎样的体验?
- CentOS7环境下伪分布式安装配置hadoop
- 阿里云服务器下安装LAMP环境(CentOS Linux 6.3) 安装与配置 php
- Hadoop伪分布式-----HBase的安装和配置
- Ubuntu16.04 下 hadoop的安装与配置(伪分布式环境)
- Hadoop伪分布式安装—Linux环境配置
- hadoop2.7集群完全分布式安装配置
- 在hadoop2.8的HA+zookeeper的环境下安装分布式HBase 1.2.5 以及HMaster的高可用(HA)
- 阿里云ECS服务器Linux环境下配置php运行环境(安装配置篇)
- 大数据环境搭建步骤详解(Hadoop,Hive,Zookeeper,Kafka,Flume,Hbase,Spark等安装与配置)
- 阿里云服务器下安装LAMP环境(CentOS Linux 6.3) 安装与配置 FTP 服务器
- Hadoop -分布式环境搭建安装配置