mysql hive 3.1安装教程_Hive 3.1.0 安装

环境初始化

预先安装mysql

解压安装包

安装Hive

1.解压

tar -zxf apache-hive-3.1.0-bin.tar.gz

Set the environment variable HIVE_HOME to point to the installation directory(配置环境变量)

#Set the environment variable HIVE_HOME

export HIVE_HOME="/usr/lib/hive-current"

if [[ -n $HIVE_HOME ]]; then

export PATH=$HIVE_HOME/bin:$PATH

fi

编辑hive-site.xml(服务端)

javax.jdo.option.ConnectionUserName

gggg

Username to use against metastore database

javax.jdo.option.ConnectionPassword

123456

password to use against metastore database

javax.jdo.option.ConnectionURL

jdbc:mysql://mysql_host/hive?createDatabaseIfNotExist=true&characterEncoding=UTF-8

JDBC connect string for a JDBC metastore

javax.jdo.option.ConnectionDriverName

com.mysql.jdbc.Driver

Driver class name for a JDBC metastore

hive.metastore.warehouse.dir

/user/hive/warehouse

hive.server2.webui.host

192.168.0.50

hive.server2.webui.port

10002

hive-site.xml (客户端)

hive.metastore.uris

thrift://master:9083

JDBC connect string for a JDBC metastore

hive.metastore.local

false

this is local store

hive.metastore.warehouse.dir

/user/hive/warehouse

启动HIVE

#run metastore

hive --service metastore &

#run hiveserver2

hive --service hiveserver2 --hiveconf hive.root.logger=INFO,console &

客户端连接

键入 hive

beeline

bin/beeline -u jdbc:hive2://master:10000

用户名/密码:(hadoop/ )

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值