Home / Posts / Hive Installation on ubuntu

Hive Installation on ubuntu

Steps to Install Hive on Ubuntu

Step 1

Create a directory named Hive and download Hive tar file. Hive tar file can be downloaded using then wget as shown below

wget http://apachemirror.wuchna.com/hive/hive-3.1.2/apache-hive-3.1.2-bin.tar.gz 

Step 2

The downloaded Hive tar file needs to be extracted using the tar command with –xvf option as shown below –

Step 3

Verify if the tar file has been uncompressed using the list command ‘ls’

Step 4

To access hive hadoop from any path, its environment variable must be set in the ~/.bashrc file that is present at the $HOME directory.

.bashrc file


export HIVE_HOME=”/usr/local/hive/ apache-hive-3.1.2-bin”


Export $PATH

Step 5

For the environment variables to be set as mentioned in the .bashrc file, the file needs to be sourced using the ‘source’ command-

Step 6

For Hive to interact with Hadoop HDFS, it must know the path to the hadoop installation directory. This can be achieved by configuring one of the hadoop hive configuration files hive-config.sh.

Set HADOOP_HOME in hive-config.sh

export HADOOP_HOME=<hadoop path>

Step 8

let’s inform hive about the database that it should use for its schema definition. The below command tells hive to use derby database as its metastore database. We can also specify this in the hadoop hive configuration file ‘hive-site.xml’ file.

$HIVE_HOME/bin/schematool –initschema –dbtype derby
we are all set to launch the Hive shell - just type hive make sure hadoop services are running


About Andanayya

Experienced Hadoop Developer with a demonstrated history of working in the computer software industry. Skilled in Big Data, Spark,Java,Sqoop, Hive,Spring Boot and SQL

Check Also

Introduction to Hadoop Architecture

Hadoop is an open source Distributed processing framework that manages data processing and storage for …