Ubuntu 14.10 下安装伪分布式hbase 0.99.0
HBase 安装分为:单击模式,伪分布式,完全分布式,在单机模式中,HBase使用本地文件系统而不是HDFS ,所有的服务和zooKeeper都运作在一个JVM中。本文是安装的伪分布式。
安装步骤如下
1 环境配置
2 安装说明
1 环境配置
1.1 Java JDK 安装,下载JDK,配置环境变量
sudo nano /etc/profile
export JAVA_HOME=/usr/dev/jdk1.7.0_51
export HADOOP_HOME=/home/lcc/software/hadoop/hadoop-2.5.0
export HBASE_HOME=/home/lcc/software/hadoop/hbase-0.99.0
export LD_LIBRARY_PATH=/home/lcc/software/dev/protobuf-2.5.0
export ANT_HOME=/usr/dev/apache-ant-1.9.4
export PATH=$PATH:$ANT_HOME/bin:$JAVA_HOME/bin:$HADOOP_HOME/bin:$HBASE_HOME/bin
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib
1.2 Hadoop安装,可参考其他教程
2 HBase安装
2.1 下载最新发布包http://mirror.bit.edu.cn/apache/hbase/,本文是hbase-0.99.0
2.2 配置环境变量HBASE_HOME
2.3 配置conf/hbase-site.xml,里面参数作用可参考http://hbase.apache.org/book.html?spm=0.0.0.0.kJVi8l#hbase_default_configurations
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
</property> <property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property> <property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property> <property>
<name>hbase.tmp.dir</name>
<value>/home/lcc/software/hadoop/hbase-0.99.0/tmp</value>
</property> <property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/lcc/software/hadoop/hbase-0.99.0/zookeeper</value>
</property> </configuration>
2.4 配置conf/hbase-env.sh,里面参数作用可参考http://hbase.apache.org/book.html?spm=0.0.0.0.kJVi8l#hbase_default_configurations
export JAVA_HOME="/usr/dev/jdk1.7.0_51"
export HBASE_MANAGES_ZK=true
2.5 启动hbase,启动之前,需要保证hadoop已经启动
lcc@lcc-HP-Pro-3380-MT:~$ start-hbase.sh
localhost: starting zookeeper, logging to /home/lcc/software/hadoop/hbase-0.99.0/bin/../logs/hbase-lcc-zookeeper-lcc-HP-Pro-3380-MT.out
starting master, logging to /home/lcc/software/hadoop/hbase-0.99.0/logs/hbase-lcc-master-lcc-HP-Pro-3380-MT.out
2.6 连接HBase
lcc@lcc-HP-Pro-3380-MT:~$ hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.99.0, r757a0952ce4674704d91a858b42ea94be8199b81, Tue Sep 16 12:58:15 PDT 2014
2.7 停止hbase
lcc@lcc-HP-Pro-3380-MT:~$ stop-hbase.sh
stopping hbase.........
localhost: stopping zookeeper.
-------------------------------------------------------------------------------------------------------------------------------------------------
查看是否启动成功,输入jps,看到有HMaster和HQuorumPeer,浏览器输入http://localhost:16030/master-status,能打开说明成功
hbase(main):001:0> lcc@lcc-HP-Pro-3380-MT:~$ jps
28522 NodeManager
817 Jps
27997 DataNode
28206 SecondaryNameNode
386 HMaster
28380 ResourceManager
27823 NameNode
300 HQuorumPeer
查看端口被哪些进程占用
netstat -pan | grep 16020
安装后因为看到没有HregionServer这个进程,还以为启动不对,就手动启动它
bin/hbase-daemon.sh start regionserver
但是这个命令总是启动不成功,查看日志发现,总是提示端口被占用lem binding to localhost/127.0.0.1:16020 : Address already in use: bind
然后查看被哪个进程占用,发现有好几个,不知道为啥,然后发现了
Start and stop additional RegionServers
The HRegionServer manages the data in its StoreFiles as directed by the HMaster. Generally, one HRegionServer runs per node in the cluster. Running multiple HRegionServers on the same system can be useful for testing in pseudo-distributed mode. The local-regionservers.sh command allows you to run multiple RegionServers. It works in a similar way to the local-master-backup.sh command, in that each parameter you provide represents the port offset for an instance. Each RegionServer requires two ports, and the default ports are 16020 and 16030. However, the base ports for additional RegionServers are not the default ports since the default ports are used by the HMaster, which is also a RegionServer since HBase version 1.0.0. The base ports are 16200 and 16300 instead. You can run 99 additional RegionServers that are not a HMaster or backup HMaster, on a server. The following command starts four additional RegionServers, running on sequential ports starting at 16202/16302 (base ports 16200/16300 plus 2).
$ .bin/local-regionservers.sh start 2 3 4 5To stop a RegionServer manually, use the local-regionservers.sh command with the
stopparameter and the offset of the server to stop.$ .bin/local-regionservers.sh stop 3
大概意思是,HMaster占用了16020这个端口,那么再用bin/hbase-daemon.sh start regionserver启动HRegionServer时候,肯定会报错,所以换用下面命令启动时,就没问题了
.bin/local-regionservers.sh start 2 3 4 5
Ubuntu 14.10 下安装伪分布式hbase 0.99.0的更多相关文章
- Ubuntu 14.10 下安装伪分布式hdoop 2.5.0
折腾了一天,其间配置SSH时候出现了问题,误删了ssh-keygen相关文件,导致配置SSH彻底萎了,又重装了系统.... 采用伪分布式模式,即hadoop将所有进程运行于同一台主机上,但此时Hado ...
- Ubuntu 14.10 下安装伪分布式hive-0.14.0
本地独立模式,MySQL作为元数据库 1 安装环境准备 1.1 安装JDK,在安装hadoop时候已经安装了,参考http://www.cnblogs.com/liuchangchun/p/40972 ...
- Ubuntu 14.10 下安装Ganglia监控集群
关于 Ganglia 软件,Ganglia是一个跨平台可扩展的,高性能计算系统下的分布式监控系统,如集群和网格.它是基于分层设计,它使用广泛的技术,如XML数据代表,便携数据传输,RRDtool用于数 ...
- Ubuntu 14.10 下安装java反编译工具 jd-gui
系统环境,Ubuntu 14.10 ,64位 1 下载JD-GUI,网址http://221.3.153.126/1Q2W3E4R5T6Y7U8I9O0P1Z2X3C4V5B/jd.benow.ca/ ...
- Ubuntu 14.10 下安装navicat
1 下载navicat,网址http://www.navicat.com.cn/download,我下载的是navicat111_premium_cs.tar.gz 2 解压到合适的位置 3 进入解压 ...
- Ubuntu 14.10下安装深度音乐客户端
很多刚从windows系统投靠到ubuntu的机油,在听音乐时不是很舒心.毕竟ubuntu软件中心的很多影音软件都是国外的朋友编写的,所以很多时候国内的朋友用着很不舒服.今天给大家推荐的是国内开发者针 ...
- Ubuntu 14.10 下安装rabbitvcs-版本控制
在Windows下用惯了TortoiseSVN这只小乌龟,到了Ubuntu下很不习惯命令行的SVN,于是经过一番寻找安装了RabbitVCS这款SVN图形化前端工具(官方网站:http://rabbi ...
- Ubuntu 14.10 下安装Synergy,不同电脑之间公用一套键盘鼠标
因为工作时候有多台电脑放在一起,如果每个用一套键盘鼠标很是不方便,所以希望能够不用电脑之间公用一套键盘鼠标. Synergy可以实现不同电脑之间公用一套键盘鼠标,并且支持简单的复制粘贴.很好用. 它还 ...
- Ubuntu 14.10 下安装Sublime Text 3,注册码,中文输入法
1 下载Sublime Text 3,网址http://www.sublimetext.com/3 2 双击deb安装 3 因为需要需要付费,输入下面的注册码,下面的注册码,来自百度,亲测可行 Sub ...
随机推荐
- Gym - 101981M:(南京) Mediocre String Problem(回文树+exkmp)
#include<bits/stdc++.h> #define ll long long #define rep(i,a,b) for(int i=a;i<=b;i++) using ...
- 牛客G-指纹锁【一题三解】
链接:https://www.nowcoder.com/acm/contest/136/G来源:牛客网 题目描述 HA实验有一套非常严密的安全保障体系,在HA实验基地的大门,有一个指纹锁. ...
- js的数据类型。
字符串 String 数字 Number 布尔 Boolean Null 空 Undefined Object 对象 Array 数组 json function ...
- Go Example--递归
package main import "fmt" func main() { fmt.Println(fact(7)) } //函数的递归 func fact(n int) in ...
- day 05JVM和深入理解java虚拟机
-----------------Java 虚拟机发展史 PS: Sun公司有 HotSpot, BEA公司有JRockit,IBM有 J9 这三个是高性能VM 在Oracle收购Sun和BEA这两 ...
- This Jenkins instance appears to be offline
tomcat 方式启动jenkins时,报:This Jenkins instance appears to be offline and offers options to "Config ...
- initrd in linux 2.6.32.27
2.6.32.27可以不指定initrd选项 如果指定initrd选项,则自动调用initrd内的linuxrc或init进行一切必要的初始化.Kernel启动参数全部会作为变量传递给这两个脚本.如r ...
- spark aggregate函数详解
aggregate算是spark中比较常用的一个函数,理解起来会比较费劲一些,现在通过几个详细的例子带大家来着重理解一下aggregate的用法. 1.先看看aggregate的函数签名在spark的 ...
- JS正则表达式验证身份证号码
function isCardNo(card) { // 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X var reg = /(^\d{1 ...
- ORACLE 12C 之集群日志位置变化
如果你还是使用 oracle 11g RAC 的目录结构方式寻找集群的日志,你会发现目录中所有的日志都是空的.actdb21:/oracle/app/12.2.0/grid/log/actdb21(+ ...