安装版本:hbase-1.2.6-bin-tar.gz
解压到/usr/local/目录(四个节点)
tar xzvf hbase-1.2.6-bin.tar.gz -C /usr/local/
mv hbase-1.2.6/ hbase/
修改配置文件conf/hbase-env.sh(四个节点)
[root@master hbase]# grep -v '^#' conf/hbase-env.sh | grep -v '^$'
export JAVA_HOME=/usr/java/default/ //此处
export HBASE_CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar //此处
export HBASE_OPTS="-XX:+UseConcMarkSweepGC"
export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
export HBASE_MANAGES_ZK=false //此处
修改配置文件conf/hbase-site.xml(四个节点)
[root@master hbase]# cat conf/hbase-site.xml
......此处省略一堆文字
<configuration>
<property>
<name>hbase.master</name>
<value>master:6000</value>
</property>
<property>
<name>hbase.master.maxclockskew</name>
<value>180000</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://master:9000/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/var/data/hbase/zookeeper</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>master,slave1,slave2,slave3</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
</configuration>
修改regionservers(四个节点)
[root@master hbase]# cat conf/regionservers
slave1
slave2
slave3
添加PATH,添加后如下
export HADOOP_HOME=/usr/local/hadoop
export HIVE_HOME=/usr/local/hive
export PATH=$PATH:/usr/local/hadoop/bin/:/usr/local/hadoop/sbin/:$HIVE_HOME/bin:/usr/local/hbase/bin
单个节点的启动
[root@master hbase]# hbase-daemon.sh start master
[root@slave1 local]# bin/hbase-daemon.sh start regionserver
整个集群启动
[root@master hbase]# start-hbase.sh
查看Hbase版本
[root@master hbase]# hbase version
HBase 1.2.6
Source code repository file:///home/busbey/projects/hbase/hbase-assembly/target/hbase-1.2.6 revision=Unknown
Compiled by busbey on Mon May 29 02:25:32 CDT 2017
From source with checksum 7e8ce83a648e252758e9dae1fbe779c9
添加web访问接口
编辑hbase-site.xml
<property>
<name>hbase.master.info.port</name>
<value>60010</value>
</property>
访问http://192.168.1.100:60010