Installing Hive
Hi Guys Today we will learn how to install Hive. It is very easy and needs only few steps.
before you start installing hive, you should have already installed hadoop. If not please check out hadoop installation post.
Steps to install Hive.
1. Download Hive from Hive 0.11.0. If you want to install other version of Hive, check its comparability with hadoop version that you have already installed. In my case i am using hadoop 1.0.3
2. Go to downloads folder, right click and extract hive-0.11.0.tar.gz.
3. Copy the extracted jar into /home/hduser/hive.
4. Edit /etc/bash.bashrc and export HADOOP_HOME if not set.
on Lubuntu
sudo leafpad /etc/bash.bashrc
on ubuntu
sudo gedit /etc/bash.bashrc
for people new to linux, leafpad and gedit are two editors to edit text files similar to notepad in windows.
5. Insert following statement in file.
export HADOOP_HOME=/home/hduser/hadoop
export HIVE_HOME= /home/hduser/hive
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HIVE_HOME/bin
6. Save the file and close it. Now close the terminal and reopen it.
7. Type hive and then enter. if your installation is right , you will log into hive shell.
Now you can run hive queries on this shell. This installation considers embedded meta-store of hive(on derby database). In coming posts we will learn how to install hive in distributed mode. Stay tuned for videos on this and share your feedback. :)
Hey! Harjeet,
ReplyDeleteThe hive-0.10.0.tar.gz. Link which is mentioned is broken, Can we use the Higher or Later version of HIVE?
Thanks Vinay for correction... I thinks old link is removed. I have changed link.
DeleteYes you can use newer version. just check for compatibility with hadoop version that you are using
This comment has been removed by the author.
ReplyDeleteHello Harjeet,
ReplyDeletePlease add below command to switch off safemode for Ubuntu users if they are getting problem while executing queries in hive prompt.
bin/hadoop dfsadmin -safemode leave
regards,
Shekhar Redd
This comment has been removed by the author.
ReplyDeleteHarjeet,
ReplyDeleteThanks for sharing the steps.
In the export HIVE_HOME path, space between equal to sign (=) and actual hive path causes error. Please change to
export HIVE_HOME=/home/hduser/hive