本文主要是介绍七十八、HBase——一键安装Hbase120,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
安装并启动Hbase,首先启动Hadoop 以及 zookeeper
[root@gree128 ~]# start-all.sh
[root@gree128 install]# cd /opt/soft/zepplin090/conf/
[root@gree128 conf]# zkServer.sh start
关闭 stop-hbase.sh
zkServer.sh stop
./zeppelin-daemon.sh stop
stop-all.sh
[root@gree128 conf]# cd /opt/soft/zepplin090/bin/
[root@gree128 bin]# ./zeppelin-daemon.sh stop
一、安装Hbase
[root@gree128 conf]# cd /opt/soft/install/
[root@gree128 install]# ls
hadoop260 hive-1.1.0-cdh5.14.2.tar.gz
hadoop-2.6.0-cdh5.14.2.tar.gz zeppelin-0.9.0-preview1-bin-all.tgz
hbase-1.2.0-cdh5.14.2.tar.gz zookeeper-3.4.5-cdh5.14.2.tar.gz
hive-1.1.0-cdh5.14.2
[root@gree128 install]# tar -zxf ./hbase-1.2.0-cdh5.14.2.tar.gz -C /opt/soft
[root@gree128 install]# ls
hadoop260 hive-1.1.0-cdh5.14.2.tar.gz
hadoop-2.6.0-cdh5.14.2.tar.gz zeppelin-0.9.0-preview1-bin-all.tgz
hbase-1.2.0-cdh5.14.2.tar.gz zookeeper-3.4.5-cdh5.14.2.tar.gz
hive-1.1.0-cdh5.14.2
[root@gree128 install]# cd /opt/soft
[root@gree128 soft]# ls
dirtest hive110 out test_20211026-1.0-SNAPSHOT.jar
hadoop260 install shell2 zepplin090
hbase-1.2.0-cdh5.14.2 nohup.out shelldemo zookeeper345
[root@gree128 soft]# mv hbase-1.2.0-cdh5.14.2 hbase120
[root@gree128 soft]# ls
dirtest hbase120 install out shelldemo zepplin090
hadoop260 hive110 nohup.out shell2 test_20211026-1.0-SNAPSHOT.jar zookeeper345
[root@gree128 soft]# cd ./hbase120/
[root@gree128 hbase120]# cd ./conf/
[root@gree128 conf]# ls
hadoop-metrics2-hbase.properties hbase-env.sh hbase-site.xml regionservers
hbase-env.cmd hbase-policy.xml log4j.properties
[root@gree128 conf]# echo $JAVA_HOME
/opt/jdk1.8.0_221
[root@gree128 conf]# vi ./hbase-env.sh
export JAVA_HOME=/opt/jdk1.8.0_221
# Tell HBase whether it should manage it's own instance of Zookeeper or not.
export HBASE_MANAGES_ZK=false
[root@gree128 conf]# vi ./hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://192.168.59.128:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/opt/soft/hbase120/hbasedir</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
</configuration>
[root@gree128 conf]# vi /etc/profile
#hbase
export HBASE_HOME=/opt/soft/hbase120
export PATH=$PATH:$HBASE_HOME/bin
[root@gree128 conf]# source /etc/profile
二、启动并使用
1、删除 ctrl + 删除键
[root@gree128 conf]# jps
2916 RunJar
1862 NameNode
2534 NodeManager
1991 DataNode
2777 ZeppelinServer
2315 ResourceManager
3515 QuorumPeerMain
2156 SecondaryNameNode
2812 RunJar
3791 Jps
[root@gree128 conf]# start-hbase.sh (HMaster,HRegionServer)
[root@gree128 conf]# hbase shell
这篇关于七十八、HBase——一键安装Hbase120的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!