首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

debian 系统安装 hadoop 跟hbase 环境

2012-07-16 
debian 系统安装 hadoop 和hbase 环境。由于 自己使用的电脑 是debian 系统。所以 也想在自己的电脑上面安装

debian 系统安装 hadoop 和hbase 环境。

由于 自己使用的电脑 是debian 系统。所以 也想在自己的电脑上面安装一个 hbase 的环境。

?

笔记本 是64 bit 的但好像不可以,虚拟 64bit的系统。

?

所以干脆 装一个 环境算了。。

?

参考文档:

?

https://ccp.cloudera.com/display/CDHDOC/CDH3+Installation


?

https://ccp.cloudera.com/display/DOC/Documentation

?

1,下载 all.deb 安装包

?

wget?http://archive.cloudera.com/one-click-install/squeeze/cdh3-repository_1.0_all.deb

?




如果没有报错误。就说明都配置对了。并且可以正常启动关闭。

配置 hbase:
首先要修改 配置文件hbase-site.xml。目录在/usr/lib/hbase/conf/。?
vi /usr/lib/hbase/conf/hbase-site.xml
<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><configuration>? <property>? ? <name>hbase.rootdir</name>? ? <value>hdfs://localhost:9000/hbase</value>? </property>? <property>? ? <name>dfs.replication</name>? ? <value>1</value>? </property></configuration>

需要修改下 /var/log/hbase/ 这个文件夹的权限。否则在启动的时候会报文件没有创建。
#root 用户修改
chmod 777 /var/log/hbase/
修改hbase-env.sh 文件。在里面设置JAVA_HOME,需要重新设置下。
vi /usr/lib/hbase/conf/hbase-env.sh
java 默认安装 在 /usr/java/default/ 目录下。

debian 系统安装 hadoop 跟hbase 环境
?


#使用hdfs 用户启动 hbase。su hdfs
sh /usr/lib/hbase/bin/start-hbase.sh
正常启动。

debian 系统安装 hadoop 跟hbase 环境
?
进入 hbase 命令行。
hbase shell
这个时候可以进入 shell 但是报错:

debian 系统安装 hadoop 跟hbase 环境
?
ERROR: org.apache.hadoop.hbase.ZooKeeperConnectionException: HBase is able to connect toZooKeeper but the connection closes immediately. This could be a sign that the server has too manyconnections (30 is the default).
需要修改 limits.conf
vi?/etc/security/limits.conf
在最后添加两行:
hdfs ?- ? ? ? nofile ?32768hbase ?- ? ? ? nofile ?32768

debian 系统安装 hadoop 跟hbase 环境
?
重启下 hbase 就可以创建表查询表了。。


debian 系统安装 hadoop 跟hbase 环境
?
都没有报错。
命令 是 参考?http://hbase.apache.org/book/quickstart.html
hbase(main):003:0> create 'test', 'cf'0 row(s) in 1.2200 secondshbase(main):003:0> list 'table'test1 row(s) in 0.0550 secondshbase(main):004:0> put 'test', 'row1', 'cf:a', 'value1'0 row(s) in 0.0560 secondshbase(main):005:0> put 'test', 'row2', 'cf:b', 'value2'0 row(s) in 0.0370 seconds
其他的就自己去练习吧。

?

?

热点排行