(HBase is a database: The Hadoop database, a NoSQL storage system designed to quickly and randomly read and write large-scale data.) This article describes the entire process of downloading and installing HBase. )
I. Download of HBase
1. Login to HBase website http://hbase.apache.org/, you can see the page shown in 1:
Figure 1 Login page of HBase website
2. Click "Here" in the red box in Figure 1 to enter the page shown in 2.
Figure 2 Download link
3. Click on the link in the red box in Figure 2 to enter the download page shown in 3.
Figure 3 Download page
Click on the file name to download the HBase installation package and source code you need, and the HBase 1.0.1 version is used in this example.
second, the installation of HBase
Upload the downloaded installation package (hbase-1.0.1-bin.tar.gz) to the Linux machine. To avoid file permissions, it is recommended that the package be uploaded to the root user. In this article, the installation package is stored in the "/ROOT/ZHOUZX" directory. Since the purpose of this installation of HBase is to learn by itself, only the standalone version is installed. The real power of hbase is embodied in the cluster, which is the deployment approach used in big data projects.
1. Unzip the installation package
Execute the "tar-zxvf hbase-1.0.1-bin.tar.gz" command to extract the installation package and get "hbase-1.0.1". To go to this directory, you can see the following files and directories:
-RW- R--R-- 1Root root140371Apr - -: GenevaChanges.Txt-RW- R--R-- 1Root root11358Jan - -: -LICENSE.Txt-RW- R--R-- 1Root root897Apr - A: -NOTICE.Txt-RW- R--R-- 1Root root1477Apr6 .:GenevaReadme.Txtdrwxr-XR- x 4Root root4096Apr - A: -Bindrwxr-XR- x 2Root root4096Apr - A: -Confdrwxr-XR- x ARoot root4096Apr - -: -Docsdrwxr-XR- x 7Root root4096Apr - -: ,HBase-webappsDrwxr-XR- x 3Root root4096June - the: -Lib
Here, the installation of HBase can be completed, below to set the environment.
2. Deploying the JDK and setting up the Java environment
For HBase to run successfully, you also need to deploy the JDK on the Linux machine and set up the Java environment. To support the latest HBase version, we recommend that you deploy the JDK version at 1.7.0.
Upload "jdk1.7.0-linux.tar.gz" to the "/usr/java" directory and run the "tar-zxvf jdk1.7.0-linux.tar.gz" command to get the contents of the "/usr/java/jdk1.7.0" directory.
The next step is to set up the Java environment under the root user (the user who installs HBase). Under Root, execute the name "VI. Bash_profile" and copy the following command to the file:
export JAVA_HOME=/usr/java/jdk1.7.0export PATH=$JAVA_HOME/bin:$PATHexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Then execute the ": Wq" command to save the file contents. At this point, the environment variable is set to complete. To determine if the environment variable is set successfully, you can directly execute the "java-version" command if the following occurs:
"1.7.0_60"1.7.0_60-b1964-Bit24.60-b09, mixed mode)
The deployment of the JDK and setting up the Java environment was successful.
3. Start and stop HBase
Go to the "/root/zhouzx/hbase-1.0.1/bin" directory and execute the "sh start-hbase.sh" or "./start-hbase.sh" command to start HBase. If the following occurs:
to /root/zhouzx/hbase-1.0.1/bin/../logs/hbase-root-master-A10168992.out
It indicates that HBase started successfully.
Next, execute the "sh stop-hbase.sh" or "./stop-hbase.sh" command to stop HBase. If the following occurs:
stopping hbase.................
Indicates that HBase has stopped running.
My public number: ZHOUZXI, please scan the following two-dimensional code:
HBase Learning Summary (1): HBase Download and installation