Hbase伪分布式配置

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

2019-09-09_22-47-38

启动hbase

./start-hbase.sh 

# 启动hbase-shell
./hbase shell

2019-09-09_22-48-02

posted @ 2019-09-13 19:31  会走的树  阅读(664)  评论(0编辑  收藏  举报