這是在前一篇Hadoop 3.1.1高可用(HA)集羣安裝筆記 基礎上,進行的操做.web
mkdir -p /opt/hbase tar -xf hbase-2.1.0-bin.tar.gz cd hbase-2.1.0 #添加環境變量 export HBASE_HOME=/opt/hbase/hbase-2.1.0 #修改使用集羣中的zookeeper vim conf/hbase-env.sh export HBASE_MANAGES_ZK=false export HBASE_CLASSPATH=/opt/hadoop/hadoop-3.1.1/etc/hadoop export HBASE_LOG_DIR=/opt/data/logs/hbase
mkdir -p /opt/data/logs/hbase cp /opt/hbase/hbase-2.1.0/lib/client-facing-thirdparty/htrace-core-3.1.0-incubating.jar /opt/hbase/hbase-2.1.0/lib/
vim conf/hbase-site.xmlexpress
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- /** * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ --> <configuration> <property> <name>hbase.rootdir</name> <value>hdfs://mycluster/hbase</value> </property> <!-- 分佈式開關 --> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <!-- zookeeper集羣地址 --> <property> <name>hbase.zookeeper.quorum</name> <value>nn01,nn02,dn01,dn02,dn03</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/opt/data/zookeeper</value> </property> <property> <name>hbase.unsafe.stream.capability.enforce</name> <value>false</value> </property> </configuration>
vim conf/regionserversapache
dn01 dn02 dn03
nn01啓動vim
start-hbase.sh
訪問web頁面app
master | regionServer |
---|---|
http://master:16010 | http://master:16030 |