Javatpoint Logo
Javatpoint Logo

HIVE Installation

Step 1: The JAVA and Hadoop must be preinstalled on your system.

Step 2: For Hive Download Hive from http://apache.petsads.us/hive/hive-0.14.0/.

It gets downloaded in /user/download folder.

Check for the files

If the download is successful you will find the below file by typing ls command.

Unzip it

Copy File

Copy the file to /usr/local/hive directory with root user

Environment for Hive

Add the below line in ./bashrc file

Now run the ./bashrc file to reflect those changes.

Configuring Hive

For Configuring Hive hive-env.sh is edited. This file is present in HIVE_HOME/conf.

Add the below line to hive-env.sh.

Step 3:Derby Database

Hive uses external Database server to configure Metastore.

Now Download and install Apache Derby

Follow the steps given below to download and install Apache Derby.

Downloading Apache Derby:

The following command is used to download Apache Derby. It takes some time to download.

Unzip it:

Copy File:

Move file to /usr/local/derby directory

Set up the enironment

Add the below line to ./bashrc file

To reflect the changes type

Create a directory to store Metastore

Create a directory named data in $DERBY_HOME directory to store Metastore data.

Step 4:Configuring Metastore of Hive

Edit hive-site.xml and append the following lines between the <configuration> and </configuration> tags:

Create a file named jpox.properties and add the following lines into it:

Step 5:Verify Hive Installation

Create the /tmp folder and a separate Hive folder in HDFS. Here, we use the /user/hive/warehouse folder. You need to set write permission for these newly created folders as shown below:

Set them in HDFS using the following commands:

The following commands are used to verify Hive installation:

Next TopicHive Data Types




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA