Ubuntu configuration hadoop - (f) Configuration Hbase

I made a mistake, Hbase which comes with a zookeeper, in fact, no additional equipment zookeeper, but installed it installed, you can put a different port used. If you have just started then another zookeeper, zookeeper stopped on the first

$ sudo su hadoop
$ zkServer.sh stop

Here begin the configuration hbase
first step, download, extract
URL: http://www.apache.org/dyn/closer.cgi/hbase/
choose a suitable version

$ sudo wget https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/hbase-1.3.6/hbase-1.3.6-bin.tar.gz
$ tar -xvf hbase-1.3.6-bin.tar.gz
$ sudo mv hbase-1.3.6 /srv/
$ sudo chown -R hadoop:hadoop /srv/hbase-1.3.6
$ sudo chmod g+w /srv/hbase-1.3.6
$ sudo ln -s /srv/hbase-1.3.6 /srv/hbase

The second step configuration environment variables (already done a few times I do not know if you are coming from before a few)

$ sudo su hadoop
$ vim ~/.bashrc

Add the following configuration:

export HBASE_HOME=/srv/hbase
export PATH=$PATH:$HBASE_HOME/bin

After saving the configuration to take effect

$ source ~/.bashrc

The third step is to configure HBase

$ cd $HBASE_HOME/conf
$ vim hbase-site.xml

Add the following configuration:

<configuration>
	<property>
		<name>hbase.rootdir</name>
		<value>hdfs://localhost:9000/hbase</value>
	</property>
	<property>
		<name>hbase.cluster.distributed</name>
		<value>true</value>
	</property>
	<property>
		<name>hbase.zookeeper.property.DataDir</name>
		<value>/srv/zookeeper/Data/data</value>
	</property>
	<property>
		<name>hbase.zookeeper.quorum</name>
		<value>laocalhost:2182</value>
	</property>
	<property>
		<name>zookeeper.znode.parent</name>
		<value>/hbase</value>
	</property>
</configuration>

And then configure the environment hbase

$ vim hbase-env.sh

Uncomment and modify the address to where your Java

export JAVA_HOME=/usr/lib/jvm/jaba-8-openjdk-amd64

Such configuration is complete
Start hbase (First you have to have started the Hadoop, see previous article)

$ start-hbase.sh

Then jps about
this time should be more than three things:

HQuorumPeer
HMaster
HRegionServer

If there is no start up, you can go inside to see the error log file, the location of the log file output will prompt.

Published 78 original articles · won praise 7 · views 10000 +

Guess you like

Origin blog.csdn.net/yao09605/article/details/103938530