Database Reference
In-Depth Information
The local mode
The local or standalone mode means running all HBase services in just one Java
process. Setting up HBase in the local mode is the easiest way to get started with
HBase and can be used to explore further or for local development. The only step
required is to download the recent release of HBase and unpack the archive (
.tar
)
in some directory such as
/opt
. Perform the following steps to set up HBase in the
local mode:
1.
Create the
hbase
directory using the following commands:
[root@localhost opt]# mkdir myhbase
[root@localhost opt]# cd myhbase
2.
Download the
hbase
binaries as the archive (
.tar
) iles and unpack it, as
shown in the following command:
[root@localhost myhbase]# wget http://mirrors.sonic.net/apache/
hbase/stable/hbase-0.98.7-hadoop2-bin.tar.gz
In the preceding command,
http://mirrors.sonic.net/apache/hbase/
can be different for different users, which is based on the user's location.
Check the suggested mirror site at
http://www.apache.org/dyn/closer.
cgi/hbase/
for the new URL.
HBase version 0.98.7 is available for Hadoop 1 and 2 as
hbase-
0.98.7-hadoop1-bin.tar.gz
and
hbase-0.98.7-hadoop2-
bin.tar.gz
. It is recommended that you use Hadoop 2 only with
HBase 0.98.7, and Hadoop 1 is available as a deprecated support. In the
local mode, a Hadoop cluster is not required as it can use the Hadoop
binaries provided in the
lib
directory of HBase. Other versions of
HBase can also be checked out at
http://www.apache.org/dyn/
closer.cgi/hbase/
.
3.
Once the HBase binaries are downloaded, extract them using the
following command:
[root@localhost myhbase]# tar xvfz hbase-0.98.7-hadoop2-bin.tar.gz
4.
Add the environment variable,
HBASE_HOME
. The following command will
write the
HBASE_HOME
environment variable to the
/etc/profile
ile, which
contains system-wide environment coniguration:
[root@localhost myhbase]# echo "export HBASE_HOME=/opt/myhbase/
hbase-0.98.7-hadoop2" >> /etc/profile