hbase2.0.5安装
(一)打开安装包所在地
[root@kylin141 ~]# cd /opt/install/
[root@kylin141 install]# ls
apache-hive-3.1.2-bin.tar.gz mysql-community-devel-5.7.28-1.el7.x86_64.rpm
apache-kylin-3.0.2-bin.tar.gz mysql-community-embedded-5.7.28-1.el7.x86_64.rpm
apache-zookeeper-3.5.7-bin.tar.gz mysql-community-embedded-compat-5.7.28-1.el7.x86_64.rpm
hadoop-3.1.3.tar.gz mysql-community-embedded-devel-5.7.28-1.el7.x86_64.rpm
hbase-2.0.5-bin.tar.gz mysql-community-libs-5.7.28-1.el7.x86_64.rpm
jdk-8u212-linux-x64.tar.gz mysql-community-libs-compat-5.7.28-1.el7.x86_64.rpm
kafka_2.11-2.4.1.tgz mysql-community-server-5.7.28-1.el7.x86_64.rpm
mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar mysql-community-test-5.7.28-1.el7.x86_64.rpm
mysql-community-client-5.7.28-1.el7.x86_64.rpm mysql-connector-java-5.1.37.jar
mysql-community-common-5.7.28-1.el7.x86_64.rpm spark-3.0.0-bin-hadoop3.2.tgz
(二)解压安装包
[root@kylin141 install]# tar -zxf hbase-2.0.5-bin.tar.gz -C /opt/soft
[root@kylin141 install]# cd /opt/soft/
[root@kylin141 soft]# ls
hadoop313 hbase-2.0.5 hive312 jdk180 zookeeper357
(三)重命名
[root@kylin141 soft]# mv hbase-2.0.5 hbase205
[root@kylin141 soft]# ls
hadoop313 hbase205 hive312 jdk180 zookeeper357
(四)查看hbase安装路径
[root@kylin141 soft]# cd ./hbase205/
[root@kylin141 hbase205]# pwd
/opt/soft/hbase205
[root@kylin141 hbase205]# ls
bin CHANGES.md conf hbase-webapps LEGAL lib LICENSE.txt NOTICE.txt README.txt RELEASENOTES.md
(五)在hbase205的conf目录下修改文件
[root@kylin141 hbase205]# cd ./conf/
[root@kylin141 conf]# ls
hadoop-metrics2-hbase.properties hbase-env.cmd hbase-env.sh hbase-policy.xml hbase-site.xml log4j.properties regionservers
1.查看JDK安装路径
[root@kylin141 conf]# echo $JAVA_HOME
/opt/soft/jdk180
2.修改文件 hbase-env.sh
[root@kylin141 conf]# vi hbase-env.sh
28 export JAVA_HOME=/opt/soft/jdk180
124 # Tell HBase whether it should manage it's own instance of ZooKeeper or not.
125 export HBASE_MANAGES_ZK=false
3.修改文件 hbase-site.xml
[root@kylin141 conf]# vi hbase-site.xml
(六)配置环境变量
[root@kylin141 conf]# vi /etc/profile
#hbase
export HBASE_HOME=/opt/soft/hbase205
export PATH=$PATH:$HBASE_HOME/bin
(七)source一下
[root@kylin141 conf]# source /etc/profile
(八)先启动Hadoop、zookeeper,再启动hbase
启动Hbase,首先启动Hadoop 以及 zookeeper
[root@kylin141 conf]# start-all.sh
[root@kylin141 conf]# zkServer.sh start
[root@kylin141 conf]# jps
16209 ResourceManager
16337 NodeManager
15685 DataNode
16789 QuorumPeerMain
15559 NameNode
15913 SecondaryNameNode
16828 Jps
启动hbase
[root@kylin141 conf]# start-hbase.sh (HMaster,HRegionServer)
[root@kylin141 conf]# jps
16209 ResourceManager
16337 NodeManager
17137 HMaster
17603 Jps
15685 DataNode
16789 QuorumPeerMain
15559 NameNode
15913 SecondaryNameNode
17292 HRegionServer
进入交互模式
[root@kylin141 conf]# hbase shell //交互模式
hbase(main):001:0> version
2.0.5, rUnknown, Thu Jun 18 15:10:52 CST 2020
Took 0.0011 seconds
hbase(main):002:0> list_namespace
NAMESPACE
default
hbase
2 row(s)
Took 3.4849 seconds
hbase(main):003:0> list_namespace_tables 'hbase'
TABLE
meta
namespace
2 row(s)
Took 0.0370 seconds
=> ["meta", "namespace"]
关闭 stop-hbase.sh
zkServer.sh stop
stop-all.sh
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)