Install Hive on Ubuntu

This post is about the installation of Hive on Ubuntu. The environment of my system is ubuntu12.04, hadoop1.0.3, hive 0.9.0. Supposing the hadoop is installed.

The details of installation for hive describe as follows:

step 1: download hive-0.9.0.tar.gz from the url: http://hive.apache.org/index.html

step 2: uncompress the above file using linux command in the shell.

$ sudo tar -xzf hive-0.9.0.tar.gz

step 3: copy the uncompressed files to the directory /home/hadoop/.

$ sudo cp -r /home/user/hive-0.9.0 /home/hadoop/

step 4: entry the configure directory of hive and copy the configure file.

$ cd /home/hadoop/hive-0.9.0/conf

$ sudo cp hive-env.sh.template hive-env.sh

step 5: modify the configure file in the last line as follows:

$ sudo gedit hive-env.sh

#add the below configure information

export Hadoop_HOME=/home/hadoop/hadoop-1.0.3

export HIVE_HOME=/home/hadoop/hive-0.9.0

export PATH=$PATH:$HIVE_HOME/bin

step 6: change the directory of hive to the hadoop user.

$ sudo chown -R hadoop:hadoop hive-0.9.0

step 7: start hive and test hive

$ bin/hive or bin/hive start or ./hive

$ show tables;

$ create database hive;

$ use hive;

$ create table test(id int,name string);

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值