Step 1. Download the stable version of Hbase file from here
Enter into the directory where the tar file is downloaded.
By default it downloads in “Downloads” directory, by using the command.
By default it downloads in “Downloads” directory, by using the command.
$ cd Downloads
Unzip the tar file by using the command:
$ sudo tar xf '/home/easylearning/Downloads/hbase- 0.94.19.tar.gz'
The extracted file looks like
Step 2. Change permissions and rename
Change the permissions of the hbase folder using the command
$ sudo chmod 777 -R '/home/easylearning/Downloads/hbase- 0.94.19.tar.gz'
Rename the folder to hbase
Step 3. Move the hbase directory
Move the hbase directory to another destination using the command.
$ sudo mv <src> <destination dir>
Example:
sudo mv '/home/easylearning/Downloads/hbase' /usr/local
Step 4. Edit the bashrc file
Open the bashrc file using the command
$ sudo gedit $HOME/.bashrc
Add the following lines in the bashrc file
export HBASE_HOME=/usr/local/hbase
export PATH=$PATH:$HBASE_HOME/bin
Step 5. Configure Hbase-env.sh with Java
Open your hbase/conf/hbase-env.sh file and set the path of java installed in your system
Open the hbase-env.sh file using the following command
Edit the file by adding the following lines to it
export JAVA_HOME=/usr/lib/jvm/java-7-oracle
export HBASE_CLASSPATH=/usr/local/hadoop/conf
export HBASE_REGIONSERVERS=/usr/local/hbase/conf/regionservers
export HBASE_MANAGES_ZK=true
Step 6. Edit hbase/conf/hbase-site.xml and set the directory you want Hbase files to be written into: hbase.rootdir.
Open the hbase-site.xml file using the command
$ sudo gedit hbase-site.xml
Add the following lines inside the configuration tag
<property>
<name>hbase.rootdir</name>
<value>/usr/local/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/easylearning/Documents/Datadir</value>
</property>
Step 7. Modify the etc/hosts document
open the etc/hosts document using the following command
sudo gedit '/etc/hosts/'
In etc/hosts there are two entries .
Change the second entry from 127.0.1.1 to 127.0.0.1
Add the third entry as
127.0.0.1 manuzhang-U24E
Step 8. To start hbase in standalone mode , we do not have to start hadoop
Go to the hbase directory using the command
cd /usr/local/hbase
To start hbase use the following command
bin/start-hbase.sh
Check whether hbase is running properly, Using the jps command
To use the web Interfaces
For Master
For region Server
Step 9. To Stop hbase
Hbase can be stopped using the following command
bin/stop-hbase.sh
ConversionConversion EmoticonEmoticon