hbase distributed deployment

The installation of this part needs to be based on the Hadoop installation, and it is required that Hadoop has been started normally. hbase needs to be deployed on the master node and the slave node, and the following operations are performed through the master node.


1 Unzip and install hbase

[phq@master ~]$ tar -zxvf hbase-0.98.9-hadoop2-bin.tar.gz

2 Configure hbase

  • Go to the main directory of the hbase installation, and then modify the configuration file
[phq@master ~]$ cd ~/hbase-0.98.9-hadoop2/conf/
(1) Modify the environment variable hbase-env.sh
  • Edit the hbase-env.sh file
[phq@master conf]$ vim hbase-env.sh

Find the following at the top of the file

# The java implementation to use.  Java 1.6 required.
# export JAVA_HOME=/usr/java/jdk1.6.0/

Remove the # and change it to the following:

# The java implementation to use.  Java 1.6 required.
export JAVA_HOME=/usr/java/jdk1.8.0_91
(2) Modify the configuration file hbase-site.xml
  • Replace the original hbase-site.xml content with the following content
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl"
href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://master:9000/hbase</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>master</value>
</property>
</configuration>
(3) Modify regionservers
  • Modify the content in regionservers to the following:
slave

3 Configure environment variables

  • Edit the system configuration file .bash_profile and add the following
#hbase
export HBASE_HOME=/home/phq/hbase-0.98.9-hadoop2
export PATH=$HBASE_HOME/bin:$PATH
export HADOOP_CLASSPATH=$HBASE_HOME/lib/*

To make the modified configuration take effect:

[phq@master ~]$ source .bash_profile

4 Start hbase

[phq@master bin]$ ./start-hbase.sh

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325495848&siteId=291194637