0


HBase的安装

先安装zookeeper

解压文件
tar -zxvf hbase-1.3.1-bin.tar.gz -C /opt/program
配置环境变量
vim /etc/profile
export HBASE_HOME=/opt/program/hbase/
export PATH=$PATH:$HBASE_HOME/bin
source /etc/profile
修改HBase配置文件
    **修改hbase-env.sh文件**
vim /opt/program/hbase/conf/hbase-env.sh
export JAVA_HOME=/opt/program/jdk  # 设置Java的安装路径
export HBASE_MANAGES_ZK=false  # 禁用HBase自带的ZooKeeper
export HADOOP_HOME=/opt/program/hadoop #hadoop路径
     **修改hbase-site.xml文件**
cd /opt/program/hbase/conf/
vim hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://master:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>master,slave1,slave2</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/opt/program/zookeeper/zdata</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
</configuration>

修改regionservers文件

vim regionservers
master
slave1
slave2
软连接hadoop配置文件到hbase
 ln -s /opt/program/hadoop/etc/hadoop/core-site.xml /opt/program/hbase/conf/
 ln -s /opt/program/hadoop/etc/hadoop/hdfs-site.xml /opt/program/hbase/conf/
分发HBase
scp -r /opt/program/hbase/ root@slave1:/opt/program/
scp -r /opt/program/hbase/ root@slave2:/opt/program/
执行查看hbase version

启动HBase
    **在Master节点上启动HBase:**
start-hbase.sh
     **在三个节点上分别使用jps命令查看进程状态:**

Master节点: HMaster HRegionServer

Slave1和Slave2节点: HRegionServer

查看命名空间
    **在Master节点上打开HBase Shell**
hbase shell
    **然后执行以下命令查看命名空间、**
list_namespace

访问HBase网页端口
master:16010


本文转载自: https://blog.csdn.net/ordo120/article/details/138977880
版权归原作者 ordo120 所有, 如有侵权,请联系我们删除。

“HBase的安装”的评论:

还没有评论