Hbase的运行需要jdk、zookeeper和Hadoop环境,这里jdk和Hadoop的安装之前文章已经描述,这里只对zookeeper和Hbase的安装进行示例,这里因为组件的下载apache官网比较慢,这里选用清华大学的镜像站:https://mirrors.tuna.tsinghua.edu.cn/
Zookeeper版本下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.8.1/
安装包还是解压到/usr/hadoop目录下,并创建zoo.cfg
[root@test sbin]# cd /usr/hadoop/
[root@test hadoop]# tar -zxvf apache-zookeeper-3.8.1-bin.tar.gz
[root@test hadoop]# cd apache-zookeeper-3.8.1-bin/conf/
[root@test conf]# ll
总用量 16
-rw-r--r--. 1 501 games 535 1月 26 00:31 configuration.xsl
-rw-r--r--. 1 501 games 4559 1月 26 00:31 logback.xml
-rw-r--r--. 1 501 games 1183 1月 26 00:31 zoo_sample.cfg
[root@test conf]# mv zoo_sample.cfg zoo.cfg
dataDir=/udata/zookeeper
#单机版,不需要配置,如果为集群这里使用ip,实际应用中使用主机名称
#server.1=172.30.43.174:2888:3888
[root@test java]# vi /etc/profile
export ZOOKEEPER_HOME=/usr/hadoop/apache-zookeeper-3.8.1-bin
export PATH=$PATH:$ZOOKEEPER_HOME/bin
[root@test java]# source /etc/profile
[root@test apache-zookeeper-3.8.1-bin]# cd bin/
[root@test bin]# ./zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/hadoop/apache-zookeeper-3.8.1-bin/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[root@test bin]# ./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/hadoop/apache-zookeeper-3.8.1-bin/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: standalone
[root@test bin]#
HBase版本下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/2.5.2/
hbase-2.5.2-hadoop3-bin.tar.gz 安装包还是解压到/usr/hadoop目录下
[root@test sbin]# cd /usr/hadoop/
[root@test hadoop]# tar -zxvf hbase-2.5.2-hadoop3-bin.tar.gz
export HBASE_HOME=/usr/hadoop/hbase-2.5.2-hadoop3
export PATH=$PATH:$HBASE_HOME/bin
export JAVA_HOME=/usr/java/jdk-11.0.2/
export HBASE_CLASSPATH=/usr/hadoop/hbase-2.5.2-hadoop3/conf
export HBASE_MANAGES_ZK=false
export HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP=true
hbase.rootdir
hdfs://172.30.43.174:9000/hbase
hbase.tmp.dir
/udata/hbase/
hbase.cluster.distributed
true
hbase.zookeeper.property.dataDir
/udata/zookeeper
hbase.zookeeper.quorum
172.30.43.174
hbase.unsafe.stream.capability.enforce
false
hbase.master.port
16000
hbase.master.info.port
16010
修改/usr/hadoop/hbase-2.5.2-hadoop3/conf/regionservers配置文件为主机名
[root@test bin]# cd /usr/hadoop/hbase-2.5.2-hadoop3/bin/
[root@test bin]# ./start-hbase.sh
[root@test bin]# jps
40032 HMaster
39091 QuorumPeerMain
40196 HRegionServer
40485 Jps
38357 NodeManager
38120 ResourceManager
37774 SecondaryNameNode
36991 NameNode
[root@test bin]#
https://blog.csdn.net/yhj_911/article/details/125481762
https://blog.csdn.net/weixin_44911081/article/details/121503511
https://blog.51cto.com/silentwolfyh/5975028