follow all steps in hadoop-3.1.3 cluster setup on linux
and then switch to root user:
su
tar -xzvf /opt/software/apache-zookeeper-3.5.7-bin.tar.gz -C /opt/module
tar -xzvf /opt/software/hbase-2.2.3-bin.tar.gz -C /opt/module
mkdir /opt/data/zookeeper
cd /opt/module/apache-zookeeper-3.5.7-bin/conf
cp zoo_sample.cfg zoo.cfg
vi zoo.cfg
sure that the values are like the following contents:
tickTime=2000
dataDir=/opt/data/zookeeper
clientPort=2181
maxClientCnxns=60
initLimit=10
syncLimit=5
server.1=master:2888:3888
server.2=slave1:2888:3888
cp zookeeper to slave1:
scp -r /opt/module/apache-zookeeper-3.5.7-bin slave1:/opt/module
cd /opt/module/apache-zookeeper-3.5.7-bin
bin/zkServer.sh start
use jps
to check QuorumPeerMain
bin/zkCli.sh -server master:2181
try simple cmds in zkshell:
ls /
create /zk_test my_data
ls /
get /zk_test
set /zk_test junk
get /zk_test
delete /zk_test
ls /
# for more details: https://hbase.apache.org/book.html#_using_existing_zookeeper_ensemble
use quit
to exit.
cd /opt/module/apache-zookeeper-3.5.7-bin
bin/zkServer.sh stop
flollow tutorials: creating-and-using-a-systemd-unit-file
vi /etc/profile
# add:
# export HBASE_HOME="/opt/module/hbase-2.2.3"
# export PATH=$PATH:/opt/module/hbase-2.2.3/bin
source /etc/profile
cd /opt/module/hbase-2.2.3/conf
vi hbase-env.sh
# add:
export JAVA_HOME="/opt/module/jdk8u392-b08"
export HBASE_MANAGES_ZK=false
vi hbase-site.xml
add properties:
<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.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>master,slave1</value>
</property>
</configuration>
vi regionservers
add master and slave1
more details, view https://hbase.apache.org/book.html#fully_dist
hbase version
if all passed, transfer to slave1:
scp -r /opt/module/hbase-2.2.3 slave1:/opt/module
#start hdfs:
$HADOOP_HOME/sbin/start-dfs.sh
# start zookeeper:
cd /opt/module/apache-zookeeper-3.5.7-bin
bin/zkServer.sh start
use jps
to check datanodes and quorum
# start hbase:
start-hbase.sh
use jps
to check HMaster and HRegionServer
local-master-backup.sh start 2
local-regionservers.sh start 2
to start shell:
hbase shell
check namespace cmds:
list_namespace
# optional cmds:
Create_namespace 'test1'
describe_namespace 'test1'
HBase Web UI: http://master:16010
download archive version of pkgs, view http://archive.apache.org/dist/spark/
for more information, view
https://zookeeper.apache.org/doc/r3.4.13/zookeeperStarted.html
https://hbase.apache.org/book.html#fully_dist
https://hbase.apache.org/book.html#quickstart_fully_distributed
https://hbase.apache.org/book.html#_using_existing_zookeeper_ensemble
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。