首先安裝jdk,然後安裝hadoop,因爲hbase依賴大數據處理,
1、下載hbase-2.0.2解壓
tar -zxvf hbase-2.0.2-bin.tar.gz
2、修改文件:
[root@hbase-master conf]# vi /data/hbase-2.0.2/conf/hbase-site.xml
在文件中添加:
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://192.168.252.19:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>192.168.252.15</value>
</property>
<property>
<name>hbase.temp.dir</name>
<value>/opt/hbase/data/temp</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value></value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.master.info.port</name>
<value>60010</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
</configuration>
3、修改文件:
[root@hbase-master conf]# vi /data/hbase-2.0.2/conf/regionservers
192.168.252.19
4、增加jdk
[root@hbase-master conf]# vi /data/hbase-2.0.2/conf/hbase-env.sh
#!/usr/bin/env bash
#
#/**
# * Licensed to the Apache Software Foundation (ASF) under one
# * or more contributor license agreements. See the NOTICE file
# * distributed with this work for additional information
# * regarding copyright ownership. The ASF licenses this file
# * to you under the Apache License, Version 2.0 (the
# * "License"); you may not use this file except in compliance
# * with the License. You may obtain a copy of the License at
# *
export JAVA_HOME=/usr/local/java/jdk1.8.0_60
5、啓動hbase:
[root@hbase-master bin]# ./start-hbase.sh
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/data/hbase-2.0.2/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/data/hadoop-3.0.2/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/data/hbase-2.0.2/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/data/hadoop-3.0.2/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
192.168.252.15: bash: /data/hbase-2.0.2/bin/hbase-daemon.sh: 沒有那個文件或目錄
running master, logging to /data/hbase-2.0.2/bin/../logs/hbase-root-master-hbase-master.out
192.168.252.19: running regionserver, logging to /data/hbase-2.0.2/bin/../logs/hbase-root-regionserver-hbase-master.out