premise:
Self Hbase Quguan network download installation package, and then spread in Ubuntu in VMware,
Into the home directory, then the installation configuration in the following manner
I am here to download the hbase-2.2.0-bin.tar version
Stand-alone mode
A decompression
tar -vxf hbase-2.2.0-bin.tar -C software /
2 Create a soft link
ln -s hbase-2.2.0 / hbase
3 configure the environment variables
export HBASE_HOME = xxxx (the path Hbase)
Export the PATH: the PATH $: $ HBASE_HOME / bin
4 Change profile
modification hbase-env.sh
export JAVA_HOME = (jdk path)
Export HBASE_MANAGES_ZK = to true (stand-alone mode to write True default)
Export HBASE_LOG_DIR = / Home / HBase / logs (here need to create a logs, then go write path)
Modify hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:///home/hbase/hbase_data</value>//这里需要创建一个hbase_data文件目录
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/hbase/zk_data</value>//这里需要创建一个zk_data文件目录
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
<description>
Controls whether HBase will check for stream capabilities (hflush/hsync).
Disable this if you intend to run on LocalFileSystem, denoted by a rootdir
with the 'file://' scheme, but be mindful of the NOTE below.
WARNING: Setting this to false blinds you to potential data loss and
inconsistent system state in the event of process and/or node failures. If
HBase is complaining of an inability to use hsync or hflush it's most
likely not a false positive.
</description>
</property>
</configuration>
Fully Distributed deployment
to create the directory
sudo mkdir / opt / HBase / logs
sudo chown HBase: hadoop / opt / HBase / logs
After entering a decompression hbase-2.0.1 / conf directory modification hbase-env.sh
modify the first line, the second three rows added
sudo vi /opt/hbase/conf/hbase-env.sh
export JAVA_HOME=/opt/jdk
export HBASE_MANAGES_ZK=false
export HBASE_LOG_DIR=/opt/hbase/logs
export HBASE_PID_DIR=/home/hbase/pids
2.0.1 Modify-2 HBase / the conf / HBase-the site.xml
the sudo VI /opt/hbase/conf/hbase-site.xml
Add the following
<! - HBase data directory location, master.hadoop is mater machine name (alias) ->
<Property>
<name> hbase.rootdir </ name>
<value> HDFS: // Master: 9000 / HBase </ value>
</ Property>
<-! enable distributed cluster ->
<Property>
<name> hbase.cluster.distributed </ name>
<value> to true </ value>
</ Property>
<! - - default HMaster HTTP access port ->
<Property>
<name> hbase.master.info.port </ name>
<value> 16010 </ value>
</ Property>
<-! default HRegionServer HTTP access port ->
<Property>
<name> hbase.regionserver.info.port </ name>
<value> 16030 </ value>
</ Property>
<-! do not use the built-in default configuration independent of ZK cluster address, in addition to master, they are worthy of a few zookeeper, with just a few here ->
<Property>
<name>hbase.zookeeper.quorum</name>
<value>master:2181,slave1:2181,slave2:2181</value>
</property>
<property>
<name>hbase.hregion.max.filesize</name>
<value>10*1024*1024*1024</value>
</property>
* Regionservers modify files in the conf join regoinserver of 3 ip
sudo vi /opt/hbase/conf/regionservers
slave1
slave2
4 to ensure that all of the machines in the cluster the same time (within 30s)
DATE
sudo -s DATE "180 722 20:14:00"
5 Create / hbase directory created only once in hdfs in
use hdfs user
hdfs the DFS -mkdir / hbase
hdfs the DFS -chown HBase: Supergroup / hbase
* Hbase on 6 master user to slave1 slave2 keyless landing
7 starts
i, done keyless master node start-hbase.sh
ii, hbase-daemon.sh start master
hbase-daemon.sh start regionserver
Ruby
after a successful configuration
point your browser to:
The machine ip: port number (16010)
Note: When entering jps, if the node does not appear HMaster
enter hostnamectl set-hostname hbase-master command.