centos7系统安装hbase shell

2022-02-17  本文已影响0人  彩色的炮灰

1、准备一台centos7系统服务器
2、安装jdk 1.8版本(安装链接:https://www.jianshu.com/p/2da52107a7e3
3、下载hbase shell工具包(链接:https://pan.baidu.com/s/1cuPZRVUVExfCd0cI_0pOYg
提取码:6666)
4、将工具包上传到centos7服务器,在服务器中解压压缩包,

tar -zxvf hbase-1.x-shell.tar.gz

5,解压后是一个名为alihbase-1.1.4的文件夹(我是使用阿里云的工具包,但是链接地址使用自己的hbase集群地址。)
6、进入文件夹——进入conf文件夹

cd alihbase-1.1.4/
cd conf/

7、编辑hbase-site.xml文件,将ZK_IP1,ZK_IP2,$ZK_IP3,替换成自己的连接地址

<configuration> 
     <property>
         <name>hbase.zookeeper.quorum</name>
         <value>$ZK_IP1,$ZK_IP2,$ZK_IP3</value>
     </property> 
</configuration>                               

8、访问集群:通过命令bin/hbase shell,可访问集群。
然后我们使用list命令查看是否登录到正确的集群。

hbase(main):003:0> list
TABLE                                                                                                                                                        
driver_score                                                                                                                                                 
meterdata_history                                                                                                                                            
position_history                                                                                                                                             
position_history_new                                                                                                                                         
trips                                                                                                                                                        
5 row(s) in 0.1700 seconds

=> ["driver_score", "meterdata_history", "position_history", "position_history_new", "trips"]

9、到此,我们就可以登录到我们制定的hbase集群。

上一篇 下一篇

猜你喜欢

热点阅读