1 下载
# wget http://apache.fayea.com/hbase/hbase-0.94.27/hbase-0.94.27.tar.gz
2 解压
# tar -zvxf hbase-0.94.27.tar.gz
3 设置环境变量
# vi /etc/profile
使用 vi /etc/profile命令修改系统环境变量
export HBASE_HOME=/export/servers/hbase-0.94.27
export PATH=$PATH:$HBASE_HOME/bin
使环境变量生效并验证环境变量生效
# source /etc/profile
# hbase version
4 修改HBase配置文件
(1)、 hbase-env.sh
取消配置JDK的注释并做并如下修改(我的JDK安装路径):
export JAVA_HOME=/export/servers/jdk1.7.0_80
export HBASE_CLASSPATH=/export/servers/hbase-0.94.27/conf
(2)、 hbase-site.xml
因为是单机启动,所以只设定了HBase写入的本地路径,修改如下:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.rootdir</name>
<value>/home/hbase</value>
</property>
</configuration>
5 启动HBase
# ./start-hbase.sh
starting master, logging to /export/servers/hbase-0.94.27/bin/../logs/hbase-root-master-localhost.localdomain.out
6 用shell来连接HBase
# bash hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.94.27, rfb434617716493eac82b55180b0bbd653beb90bf, Thu Mar 19 06:17:55 UTC 2015
hbase(main):001:0>
# wget http://apache.fayea.com/hbase/hbase-0.94.27/hbase-0.94.27.tar.gz
2 解压
# tar -zvxf hbase-0.94.27.tar.gz
3 设置环境变量
# vi /etc/profile
使用 vi /etc/profile命令修改系统环境变量
export HBASE_HOME=/export/servers/hbase-0.94.27
export PATH=$PATH:$HBASE_HOME/bin
使环境变量生效并验证环境变量生效
# source /etc/profile
# hbase version
4 修改HBase配置文件
(1)、 hbase-env.sh
取消配置JDK的注释并做并如下修改(我的JDK安装路径):
export JAVA_HOME=/export/servers/jdk1.7.0_80
export HBASE_CLASSPATH=/export/servers/hbase-0.94.27/conf
(2)、 hbase-site.xml
因为是单机启动,所以只设定了HBase写入的本地路径,修改如下:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.rootdir</name>
<value>/home/hbase</value>
</property>
</configuration>
5 启动HBase
# ./start-hbase.sh
starting master, logging to /export/servers/hbase-0.94.27/bin/../logs/hbase-root-master-localhost.localdomain.out
6 用shell来连接HBase
# bash hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.94.27, rfb434617716493eac82b55180b0bbd653beb90bf, Thu Mar 19 06:17:55 UTC 2015
hbase(main):001:0>