HIVE的安装和使用

1、安装

1.1、下载apache-hive-0.13.1-bin.tar.gz

1.2、解压至安装目录

tar -zxv -f apache-hive-0.13.1-bin.tar.gz  -C ../soft/
#此处为了方便,进行了文件路径重命名
mv apache-hive-0.13.1-bin/ hive013

 1.3、修改.bash_profile文件

export HIVE_HOME=/home/xuelu/soft/hive013
PATH=$PATH:$HADOOP_HOME/bin:$MAVEN_HOME/bin:$ZOOKEEPER_HOME/bin:$HIVE_HOME/bin

 

 

2、运行

由于Hive依赖于Hadoop,必须保证hadoop已经安装,并在Path中配置,另外

In addition, you must create /tmp and /user/hive/warehouse (aka hive.metastore.warehouse.dir) and set them chmod g+w in HDFS before you can create a table in Hive.

Commands to perform this setup:

  $ $HADOOP_HOME/bin/hdfs dfs -mkdir       /tmp
  $ $HADOOP_HOME/bin/hdfs dfs -mkdir       /user/hive/warehouse
  $ $HADOOP_HOME/bin/hdfs dfs -chmod g+w   /tmp
  $ $HADOOP_HOME/bin/hdfs dfs -chmod g+w   /user/hive/warehouse

To use the Hive command line interface (CLI) from the shell:

  $ $HIVE_HOME/bin/hive

 

 

原文地址:https://cwiki.apache.org/confluence/display/Hive/GettingStarted

转载于:https://www.cnblogs.com/xuelu/p/4085702.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值