Ubuntu12.04安装Hive(二)

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.

[plain]  view plain copy
  1. $ sudo tar -xzf hive-0.10.0.tar.gz  

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

[html]  view plain copy
  1. $ sudo cp -r /home/eboss/hive /usr/local/hadoop/
  2. $ mvhive-0.10.0  hive

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

[html]  view plain copy
  1. $ cd /usr/local/hadoop/hive/conf  
  2.   
  3. $ sudo cp hive-env.sh.template hive-env.sh  

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

[html]  view plain copy
  1. $ sudo gedit /usr/local/hadoop/hive/conf/hive-env.sh  
  2.   
  3. #add the below configure information  
  4.   
  5. export Hadoop_HOME=/usr/local/hadoop/
  6.   
  7. export HIVE_HOME=/usr/local/hadoop/hive 
  8.   
  9. export PATH=$PATH:/usr/local/hadoop/hive/bin  

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

[html]  view plain copy
  1. $ sudo chown -R hadoop:hadoop hive  

step 7: start hive and test hive

[html]  view plain copy
  1. $ bin/hive or bin/hive start or ./hive  
  2.   
  3. $ show tables;  
  4.   
  5. $ create database hive;  
  6.   
  7. $ use hive;  
  8.   
  9. $ create table test(id int,name string);  

step 8: modify hive-exec-log4j.properties.template

[html]  view plain copy
  1.  mv conf/hive-exec-log4j.properties.template  conf/hive-exec-log4j.properties
  2. 如果不修改此文件的话 启动hive时会出现警告信息的

step 8: 配置hive支持mysql数据的导入

[html]  view plain copy
  1.  要把mysql-connector-java-5.1.22-bin.jar 复制到 hive/lib目录下
  2. 如果不修改此文件的话 启动hive时会出现警告信息的







444

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值