Install Hive on Ubuntu

柔情只为你懂 2022-04-24 07:34 363阅读 0赞

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.

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

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

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

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

  1. $ cd /home/hadoop/hive-0.9.0/conf
  2. $ sudo cp hive-env.sh.template hive-env.sh

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

  1. $ sudo gedit hive-env.sh
  2. #add the below configure information
  3. export Hadoop_HOME=/home/hadoop/hadoop-1.0.3
  4. export HIVE_HOME=/home/hadoop/hive-0.9.0
  5. export PATH=$PATH:$HIVE_HOME/bin

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

  1. $ sudo chown -R hadoop:hadoop hive-0.9.0

step 7: start hive and test hive

  1. $ bin/hive or bin/hive start or ./hive
  2. $ show tables;
  3. $ create database hive;
  4. $ use hive;
  5. $ create table test(id int,name string);

发表评论

表情:
评论列表 (有 0 条评论,363人围观)

还没有评论,来说两句吧...

相关阅读