hbase2.2.3安装记录

Hbase 安装配置记录:

1. 下载

Hbase官网: https://hbase.apache.org/downloads.html

这里使用2.2.3版本:下载至 /opt 下

wget http://mirror.bit.edu.cn/apache/hbase/2.2.3/hbase-2.2.3-bin.tar.gz

wget http://mirrors.tuna.tsinghua.edu.cn/apache/hbase/2.2.3/hbase-2.2.3-bin.tar.gz

2. 解压:

tar -zxvf hbase-2.2.3-bin.tar.gz

解压之后压缩包 可以选择删除

rm -r hbase-2.2.3-bin.tar.gz

3. 重命名:

mv hbase-2.2.3 hbase

4. 配置

进入该目录下的conf目录:

cd /opt/hbase/conf
4.1 vi hbase-env.shhbase-env.sh中添加:
export JAVA_HOME=/usr/local/java/jdk1.8.0_202
export HBASE_MANAGES_ZK=false
4.2 vi hbase-site.xml 编辑 hbase-site.xml

之间 添加如下代码:
master,slave0,slave1为三台主机名(改为自己的就行)

<property>
 <name>hbase.zookeeper.quorum</name>
 <value>master,slave0,slave1</value>
 <description>The directory shared by RegionServers.
 </description>
</property>

 <property>
  <name>hbase.rootdir</name>
  <value>hdfs://master:9000/hbase</value>
  <description>The directory shared by RegionServers.
  </description>
 </property>

 <property>
  <name>hbase.cluster.distributed</name>
  <value>true</value>
  <description>The mode the cluster will be in. Possible values are
   false: standalone and pseudo-distributed setups with managed Zookeeper
   true: fully-distributed with unmanaged Zookeeper Quorum (see hbase-env.sh)
  </description>
 </property>

 <property>
	<name>hbase.master.info.port</name>
	<value>60010</value>
</property>

hbase.zookeeper.quorum为zookeeper的节点主机名,

hbase.rootdir为hbase的存储根目录,设为hadoopHDFS根目录下的hbase

4.3 修改regionservers
vi /opt/hbase/conf/regionservers

配置内容:

删除:localhost

添加:

slave0
slave1
4.4 各个主机之间复制hbase
scp -r /opt/hbase slave0:/opt/
scp -r /opt/hbase slave1:/opt/
4.5 让配置生效
source ~/.bash_profile
4.6 切换到hbase的bin目录下

启动hbase

./start-hbase.sh
4.7 启动hbase shell客户端 bin目录下:
./hbase shell

你可能感兴趣的:(hbase,linux,大数据)