HBase build --Fully-distributed
1, set up by way of illustration
By default, HBase runs in standalone mode. Both standalone mode and pseudo-distributed mode are provided for the purposes of small-scale testing. For a production environment, distributed mode is advised. In distributed mode, multiple instances of HBase daemons run on multiple servers in the cluster.
2, build step
1, the hosts file to all nodes in the cluster configuration
2, all nodes in the cluster firewall close
3, the time for all nodes in the cluster to set consistent
yum install ntpdate
ntpdate ntp1.aliyun.com
4, all of the node is set keyless landing
ssh-keygen
ssh-copy-id -i /root/.ssh/id_rsa.pub node01(节点名称)
5, extract the installation package hbase
tar xzvf hbase-2.0.5-bin.tar.gz -C /opt/bigdata
cd hbase-2.0.5/
6, configuration HBase environment variables in / etc / profile file
export HBASE_HOME=/opt/bigdata/hbase-2.0.5
将$HBASE_HOME设置到PATH路径中
7, into the /opt/bigdata/hbase-2.0.5/conf directory, add JAVA_HOME in hbase-env.sh file
设置JAVA的环境变量
JAVA_HOME=/usr/java/jdk1.8.0_181-amd64
设置是否使用自己的zookeeper实例
HBASE_MANAGES_ZK=false
8, into the /opt/bigdata/hbase-2.0.5/conf directory, add hbase related properties in hbase-site.xml file
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://mycluster/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>node02,node03,node04</value>
</property>
</configuration>
9, modify regionservers files, settings which several nodes distributed regionserver
node02
node03
node04
10, if you need to configure high availability Master, you need to create backup-masters file in the conf directory and add the following:
node04
11, the file to copy hdfs-site.xml conf directory
cp /opt/bigdate/hbase-2.6.5/etc/hadoop/hdfs-site.xml /opt/bigdata/hbase-2.0.5/conf
12, run hbase shell command in any directory, enter the command line hbase related operations.