Hbase -0.98伪分布式安装与配置
一,安装环境介绍
软件:操作系统Linux Cent OS 6.5 , jdk1.8.0_111,hadoop-2.4.0 hbase-0.98.16-hadoop2-bin.tar.gz
二,具体安装流程
1,解压安装包
shell命令:
[hadoop@Master ~]$ cd /usr
[hadoop@Master ~]$ sudo tar -xvf /home/hadoop/hbase-098.3.tar.gz
#解压安装源码包
[hadoop@Master ~]$ sudo mv /home/hadoop/hbase /usr/local
[hadoop@Master ~]$ cd /usr/local/hbase
[hadoop@Master hbase]$ sudo chown -R hadoop:hadoop hbase #赋予hbase安装目录下所有文件hadoop权限
2,配置环境变量
[hadoop@Master ~]sodo vim /etc/profile
在文件中添加如下内容:
export
HBASE_HOME=
/usr/local/hbase
export
PATH=$HBASE_HOME/bin:$PATH
保存退出
执行source命令使上述配置在当前终端立即生效
[hadoop@Master ~]$ source /etc/profile
验证是否配置成功
[hadoop@Master ~]$ hbase version
3,配置hbase-env.sh
[hadoop@Master ~]$ cd /usr/local/hbase/conf
[hadoop@Master conf]$ vim hbase-env.sh
在文件中添加如下内容:
export JAVA_HOME=/usr/java/jdk1.8.0_111
export HBASE_MANAGES_ZK=true
4,配置hbase-site.xml
[hadoop@Master ~]$ cd /usr/local/hbase/conf
[hadoop@Master conf]$ vim hbase-site.xml
在文件中添加如下内容:
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://10.10.10.140:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/usr/local/hbase/data/zookeeper</value>
</property>
</configuration>
保存退出
5, 启动hbase
[hadoop@Master bin]$ ./start-hbase.sh
[hadoop@Master bin]$jps
17040 DataNode
17968 Jps
16915 NameNode
17507 HQuorumPeer
17719 HRegionServer
17592 HMaster
17198 SecondaryNameNode
[hadoop@master hbase]$ hbase shell
2017-04-28 13:56:49,379 INFO [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.98.16-hadoop2, r0b96029377a1eeb8bf4a0f26da28379bcf71a731, Mon Nov 9 19:16:25 PST 2015
hbase(main):001:0>
list
TABLE
2017-04-28 13:56:57,671 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
0 row(s) in 1.3600 seconds
注:警告是因为64位与32位的原因