Thursday 8 September 2016

HIVE INSTALLATION


                               HIVE INSTALLATION


Installation of Hive 1.2.1 on Ubuntu 14.04 and Hadoop 2.6.0

1. Download hive on below path:
                                                 
2. Extract the .tar.gz file in Downloads/ and rename it to hive/ and move the folder to /usr/lib/hive path:
sudo mkdir /usr/lib/hive
sudo mv Downloads/hive /usr/lib

3. Provide access to hive path by chnaging the owners and groups.
sudo chown R
hduser(manju):hadoop /usr/lib/hive

4. Configure environment variables in .bashrc file.
hduser(manju)$ vim ~/.bashrc
export HIVE_HOME=/usr/lib/hive/
export PATH=$PATH:$HIVE_HOME/bin
export HADOOP_USER_CLASSPATH_FIRST=true

5. Apply the changes to bashrc file.
Hduser(manju)$ source ~/.bashrc

6. Create folders for hive in HDFS
hadoop fs  -mkdir /tmp
hadoop fs -mkdir /user/hive/warehouse
hadoop fs -chmod g+w /tmp
hadoop fs -chmod g+w /user/hive/warehouse

7. Configuring Hive
To configure Hive with Hadoop, you need to edit the hive-env.sh file, which is
placed in the $HIVE_HOME/conf directory. The following commands redirect to
Hive config folder and copy the template file:
hduser$ cd $HIVE_HOME/conf
hduser$ cp hive-env.sh.template hiveenv.sh

Edit the hive-env.sh file by appending the following line:
export HADOOP_HOME=/usr/local/hadoop

8. Run the hive
hive

2 comments:

  1. Wow!!! I loved the way you explained pin to pin clearance. Please keep sharing these type of information.
    Big Data Hadoop online training in india

    ReplyDelete
  2. It was really a nice article and i was really impressed by reading this Big Data Hadoop Online Training Bangalore

    ReplyDelete