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 ...
随机推荐
- [LeetCode&Python] Problem 888. Fair Candy Swap
Alice and Bob have candy bars of different sizes: A[i] is the size of the i-th bar of candy that Ali ...
- [LeetCode&Python] Problem 226. Invert Binary Tree
Invert a binary tree. Example: Input: 4 / \ 2 7 / \ / \ 1 3 6 9 Output: 4 / \ 7 2 / \ / \ 9 6 3 1 Tr ...
- Java IntelliJ IDEA 不能显示项目里的文件结构
方法一: 关闭IDEA, 然后删除项目文件夹下的.idea文件夹 重新用IDEA工具打开项目 方法二: 菜单:File -> Invalidate Caches / Restart
- spawn函数的实现(前文自动执行器的翻版)
function spawn(genF) { return new Promise(function(resolve, reject) { const gen = genF(); function s ...
- (5)MySQL的查询:模糊查询(通配符查询like)、限制符查询(limit)、排序查询(order by)、分组查询(group by)、(子查询)
注意事项 指令语法的优先级: where > group by >order by > limit 例:select count(id) as cnt,age from tablen ...
- hdu1875 畅通工程再续 并查集/最小生成树
相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现.现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全 ...
- UML异步怎么表达
直接看结果 第一虚框和第二虚框是异步的.m1 和m2 没有任何先后关系. 第一虚框和第二虚框是异步的,两者没有任何先后关系.m3和m4是有先后关系的.m3()比m4()先执行.同样m5()和m6().
- Pycharm主题设置以及导入方式
主题下载链接: http://www.themesmap.com/ pycharm -- 导入主题(theme) and 修改背景颜色(护眼色) 前情提要 众所周知,随着python语言的不断流行 ...
- 用actor model实现intel tbb这样的用法
关于什么事actor model,什么事intel tbb这样的用法我就不详细说了,具体请上网查文档 class MyActor { F f; MyActor inputs[]; MyActor ou ...
- git merge 和 git merge --no-ff
根据这张图片可以看出 git merge –no-ff 可以保存你之前的分支历史.能够更好的查看 merge历史,以及branch 状态. git merge 则不会显示 feature,只保留单条分 ...