1,创建hbase的安装路径 [root@node01 ~]# mkdir staging [root@node01 ~]# cd staging 2,利用xftp上传hbase [root@node01 staging]# tar zxvf hbase-1.2.1-bin.tar.gz -C /usr——》解压hbase [root@node01 staging]# cd /usr/ [root@node01 usr]# mv hbase-1.2.1 hbase——》重命名hbase 3,再所有节点下添加环境变量 [root@node01 ~]# vi /etc/profile # set hbase environment export HBASE_HOME=/usr/hbase export PATH= H B A S E H O M E / b i n : HBASE_HOME/bin: HBASEHOME/bin:PATH 4,[root@node01 ~]# source /etc/profile——》使环境生效 [root@node01 ~]# cd /usr/hbase/conf 5,配置hbase-env.sh环境变量 [root@node01 conf]# vi hbase-env.sh export JAVA_HOME=/opt/jdk1.8.0_152 export HBASE_MANAGES_ZK=false export HBASE_CLASSPATH=/usr/hadoop/etc/hadoop export HBASE MANAGES ZK=false 6,配置hbase-site.xml环境 [root@node01 conf]# vi hbase-site.xml
hbase.rootdir hdfs://node01:9000/hbase The directory shared by region servers.hbase.node01.info.port60010hbase.zookeepe.property.clientPort2181Property from ZooKeeper's config zoo.cfg. The port at which the clients will connect.zookeeper.session.timeout120000hbase.zookeeper.quorumnode01,node02,node03hbase.tmp.dir/usr/hbase/tmphbase.cluster.distributedtrue
hbase.rootdir hdfs://node01:9000/hbase The directory shared by region servers.
hbase.node01.info.port60010
hbase.zookeepe.property.clientPort2181Property from ZooKeeper's config zoo.cfg. The port at which the clients will connect.
zookeeper.session.timeout120000
hbase.zookeeper.quorumnode01,node02,node03
hbase.tmp.dir/usr/hbase/tmp
hbase.cluster.distributedtrue
在这个地方大家注意修改自己的主机名也就是三个节点名
7,配置regionservers环境 [root@node01 conf]# vi regionservers [root@node01 ~]# cd /usr 8,[root@node01 usr]# mkdir /usr/hbase/tmp——》创建目录 9,将node01上的hbase安装文件同步到node02,node03 [root@node01 ~]# scp -r /usr/hbase root@node02:/usr [root@node01 ~]# scp -r /usr/hbase root@node03:/usr 10,启动Hadoop [root@node01 ~]# start-all.sh 11,在每个节点启动zookeeper [root@node01 ~]# zkServer.sh start 12,启动hbase [root@node01 ~]# start-hbase.sh 13,在浏览器中输入http://192.168.14.165:16010,如下 14,[root@node01 ~]# date——》查看每个节点时间是否同步 15,关闭hbase [root@node01 ~]# stop-hbase.sh 16,在所有节点下关闭zookeeper [root@node01 ~]# zkServer.sh stop 17,关闭Hadoop [root@node01 ~]# stop-all.sh 附件:hbase的下载网址 https://archive.apache.org/dist/hbase/