栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

hbase安装教程 单机版

hbase安装教程 单机版

提前安装好hadoop和zookeeper

[root@mihaoyu151 ~]# cd /opt/install/

[root@mihaoyu151 install]# ll
total 2580684
-rw-r--r--. 1 root root  433895552 Oct 25 17:59 hadoop-2.6.0-cdh5.14.2.tar.gz
-rw-r--r--. 1 root root  267038262 Nov 19 17:07 hbase-1.2.0-cdh5.14.2.tar.gz
-rw-r--r--. 1 root root  128523051 Oct 25 17:59 hive-1.1.0-cdh5.14.2.tar.gz
-rw-r--r--. 1 root root  195094741 Oct 20 22:25 jdk-8u221-linux-x64.tar.gz
-rw-r--r--. 1 root root     848399 Nov  9 14:22 mysql-connector-java-5.1.25.jar
-rw-r--r--. 1 root root 1582476522 Nov 15 13:40 zeppelin-0.9.0-preview1-bin-all.tgz
-rw-r--r--. 1 root root   34731946 Nov  3 19:09 zookeeper-3.4.5-cdh5.14.2.tar.gz

解压
[root@mihaoyu151 install]# tar -zxf hbase-1.2.0-cdh5.14.2.tar.gz -C ../soft

[root@mihaoyu151 install]# cd ../soft/
[root@mihaoyu151 soft]# ls
hadoop260  hbase-1.2.0-cdh5.14.2  hive110  jdk180  nohup.out  zeppelin090  zookeeper345
重命名
[root@mihaoyu151 soft]# mv hbase-1.2.0-cdh5.14.2/ hbase120

[root@mihaoyu151 soft]# cd hbase120/
[root@mihaoyu151 hbase120]# ls
bin          hbase-annotations  hbase-external-blockcache  hbase-protocol         hbase-shell         LICENSE.txt
CHANGES.txt  hbase-assembly     hbase-hadoop2-compat       hbase-resource-bundle  hbase-testing-util  NOTICE.txt
cloudera     hbase-checkstyle   hbase-hadoop-compat        hbase-rest             hbase-thrift        pom.xml
conf         hbase-client       hbase-it                   hbase-rsgroup          hbase-webapps       README.txt
dev-support  hbase-common       hbase-prefix-tree          hbase-server           LEGAL               src
docs         hbase-examples     hbase-procedure            hbase-shaded           lib

[root@mihaoyu151 hbase120]# cd conf/
[root@mihaoyu151 conf]# ls
hadoop-metrics2-hbase.properties  hbase-env.sh      hbase-site.xml    regionservers
hbase-env.cmd                     hbase-policy.xml  log4j.properties
[root@mihaoyu151 conf]# echo $JAVA_HOME
/opt/soft/jdk180
[root@mihaoyu151 conf]# pwd
/opt/soft/hbase120/conf
[root@mihaoyu151 conf]# vi hbase-env.sh
27 export JAVA_HOME=/opt/soft/jdk180
128 export Hbase_MANAGES_ZK=false

[root@mihaoyu151 conf]# vi hbase-site.xml
   
     hbase.rootdir
     hdfs://192.168.133.151:9000/hbase
   
   
     hbase.cluster.distributed
     true
   
   
     hbase.zookeeper.property.dataDir
     /opt/soft/hbase120/hbasedir
   
   
     hbase.zookeeper.property.clientPort
     2181
   
[root@mihaoyu151 conf]# vi /etc/profile
#hbase
export Hbase_HOME=/opt/soft/hbase120
export PATH=$PATH:$Hbase_HOME/bin
[root@mihaoyu151 conf]# source /etc/profile

[root@mihaoyu151 ~]# start-all.sh 
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
21/11/22 07:59:09 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [mihaoyu151]
mihaoyu151: starting namenode, logging to /opt/soft/hadoop260/logs/hadoop-root-namenode-mihaoyu151.out
mihaoyu151: starting datanode, logging to /opt/soft/hadoop260/logs/hadoop-root-datanode-mihaoyu151.out
Starting secondary namenodes [mihaoyu151]
mihaoyu151: starting secondarynamenode, logging to /opt/soft/hadoop260/logs/hadoop-root-secondarynamenode-mihaoyu151.out
21/11/22 07:59:27 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
starting yarn daemons
starting resourcemanager, logging to /opt/soft/hadoop260/logs/yarn-root-resourcemanager-mihaoyu151.out
mihaoyu151: starting nodemanager, logging to /opt/soft/hadoop260/logs/yarn-root-nodemanager-mihaoyu151.out

[root@mihaoyu151 ~]# mr-jobhistory-daemon.sh start historyserver
starting historyserver, logging to /opt/soft/hadoop260/logs/mapred-root-historyserver-mihaoyu151.out

[root@mihaoyu151 conf]# zkServer.sh start
JMX enabled by default
Using config: /opt/soft/zookeeper345/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

[root@mihaoyu151 conf]# start-hbase.sh 
starting master, logging to /opt/soft/hbase120/logs/hbase-root-master-mihaoyu151.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
starting regionserver, logging to /opt/soft/hbase120/logs/hbase-root-1-regionserver-mihaoyu151.out

[root@mihaoyu151 conf]# jps
3814 QuorumPeerMain
2823 ZeppelinServer
4103 HRegionServer
1749 JobHistoryServer
2389 ResourceManager
2518 NodeManager
4473 Jps
2234 SecondaryNameNode
1947 DataNode
1852 NameNode
3965 HMaster

[root@mihaoyu151 conf]# hbase shell
2021-11-19 17:39:59,002 INFO  [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
2021-11-19 17:40:00,383 WARN  [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/soft/hbase120/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/soft/hadoop260/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Hbase Shell; enter 'help' for list of supported commands.
Type "exit" to leave the Hbase Shell
Version 1.2.0-cdh5.14.2, rUnknown, Tue Mar 27 13:31:54 PDT 2018

hbase(main):001:0>
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/581477.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号