Hive安装配置

2 篇文章 0 订阅
1 篇文章 0 订阅
hive官方文档的地址:https://cwiki.apache.org/confluence/display/Hive/GettingStarted
安装hive,用的0.13.1版本
1、搭建好hadoop的环境
2、解压hive,进入到conf文件夹修改 hive-env.sh
   ①:修改 HADOOP_HOME 为hadoop的安装路径:
      HADOOP_HOME=/opt/hadoop/hadoop-2.7.3
   ②:修改 HIVE_CONF_DIR
      export HIVE_CONF_DIR=/opt/apache-hive-0.13.1-bin/conf
3、创建文件夹:
   首先创建/tmp 文件夹,因为在搭建hadoop的时候我已经创建了,所以不用再重新创建,我的是在/opt/hadoop/tmp下
   创建:/hive/warehouse  默认是在:/user/hive/warehouse,我是创建在/opt/hadoop/hive/warehouse
4、添加权限:
   要给/tmp 和 /hive/warehouse 添加权限,对同组用户添加权限:chmod g+x 因为我的目录的权限已经有了,所以不用在添加了
5、进入到hive的安装目录的bin中,启动hive命令,第一次启动会有些慢
[root@tiancunPC apache-hive-0.13.1-bin]# cd bin
[root@tiancunPC bin]# ll
总用量 32
-rwxr-xr-x. 1 tiancun tiancun  881 1月  30 2014 beeline
drwxr-xr-x. 3 root    root    4096 11月 12 13:52 ext
-rwxr-xr-x. 1 tiancun tiancun 7164 5月  13 2014 hive
-rwxr-xr-x. 1 tiancun tiancun 1900 1月  30 2014 hive-config.sh
-rwxr-xr-x. 1 tiancun tiancun  885 1月  30 2014 hiveserver2
-rwxr-xr-x. 1 tiancun tiancun  832 1月  30 2014 metatool
-rwxr-xr-x. 1 tiancun tiancun  884 1月  30 2014 schematool
[root@tiancunPC bin]# ./hive

Logging initialized using configuration in jar:file:/opt/apache-hive-0.13.1-bin/lib/hive-common-0.13.1.jar!/hive-log4j.properties
hive>

这就进入到了命令行,可以查看有多少个数据库:
命令:show databases, 命令的操作跟mysql特别像
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值