Time for action – installing Hive

Let's now set up Hive so we can start using it in action.

  1. Download the latest stable version of Hive and move it to the location to which you wish to have it installed:
    $ mv hive-0.8.1.tar.gz /usr/local
    
  2. Uncompress the package:
    $ tar –xzf hive-0.8.1.tar.gz
    
  3. Set the HIVE_HOME variable to the installation directory:
    $ export HIVE_HOME=/usr/local/hive
    
  4. Add the Hive home directory to the path variable:
    $ export PATH=${HIVE_HOME}/bin:${PATH}
    
  5. Create directories required by Hive on HDFS:
    $ hadoop fs -mkdir /tmp
    $ hadoop fs -mkdir /user/hive/warehouse
    
  6. Make both of these directories group writeable:
    $ hadoop fs -chmod g+w /tmp
    $ hadoop fs -chmod g+w /user/hive/warehouse
    
  7. Try to start Hive:
    $ hive
    

    You will receive the following ...

Get Hadoop: Data Processing and Modelling now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.