Hbase配置
tar -zxvf hbase-1.2.6-bin.tar.gz
mkdir /opt/hbase
mv hbase-1.2.6 /opt/hbase/hbase1.2.6
# 配置环境变量
vim /etc/profile
# HBase Config
export HBASE_HOME=/opt/hbase/hbase1.2.6
# PATH config
export PATH=.:${JAVA_HOME}/bin:${SCALA_HOME}/bin:${SPARK_HOME}/bin:${HADOOP_HOME}/bin:${HADOOP_HOME}/sbin:${ZK_HOME}/bin:${HBASE_HOME}/bin:${HIVE_HOME}/bin:${KAFKA_HOME}/bin:${SQOOP_HOME}/bin:${FLUME_HOME}/bin:${STORM_HOME}/bin:$PATH
source /etc/profile
修改hbase-env.sh
cd /opt/hbase/hbase1.2/conf
vim hbase-env.sh
export JAVA_HOME=/opt/jdk/jdk1.8
# export HBASE_CLASSPATH=/opt/hadoop/hadoop2.7/etc/hadoop
export JAVA_CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export HBASE_MANAGES_ZK=true
说明:配置的路径以自己的为准。HBASE_MANAGES_ZK=false 是不启用HBase自带的Zookeeper集群。
修改hbase-site.xml
vim hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://slave2:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.master.info.port</name>
<value>16010</value>
</property>
</configuration>
查看配置是否成功
cd /opt/hbase/hbase1.2.6/bin/
./hbase version
启动hbase
./start-hbase.sh
# 启动hbase-shell
./hbase shell