Introduction to Hive Installation
In Hive Installation there some prerequisites should be done before Installing.
Hadoop components like Hive, Hbase, Pig, etc all support the Linux environment. Therefore, it is recommended to have a Linux operating system on your device. If it is not the case and you want to practice on hive while having windows on your system. What you can do is, Install the CDH machine on your system and use it as a platform to explore Hadoop. This will require a minimum of 4GB Ram on your system or You can have a CDH machine in your pen drive and use it.
Anyhow you can always have a solution to your question that maybe sooner than later.
Prerequisites to Install Hive
There are some prerequisites to install hive on any machine:
- Java Installation
- Hadoop Installation
- Verify Java is installed.
- Open the Terminal and Type the Command.
- If java is installed on the system it will give you the version or else an error. In my case, Java is already installed and below is the output of the command.
- In case, Java is not installed in your system. You can visit the below link and download java and install it.
- http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads- 1880260.html.
- Extract the downloaded.
- Move it to “/usr/local/”.
- Set up PATH and JAVA_HOME variables.
- Verify Hadoop is installed.
- Open the Terminal and type the command.
- If Hadoop is already installed, this command will give you the version or else an error.
- In my case, Hadoop has already installed hence the below output.
- You can now observe I am working with a CDH5 machine.
- If Hadoop is not installed, Download the Hadoop from Apache software foundation.
1. Setup Hadoop
2. Configure Hadoop
Files required to be edited to configure Hadoop are:
3. Setup Namenode using the command:
Hdfs namenode -format
4. Start dfs using the following command:
5. Start yarn using the command:
How to Install Hive?
Below the points helps to install hive:
- The first thing we need to do is download the hive release which can be performed by clicking the link below: http://apachemirror.wuchna.com/hive/
- Above link will give the link from which you have to choose stable-2 highlighted below in yellow:
- After opening stable-2, choose the bin file (highlighted yellow in the screenshot) and right click and “copy link address”.
Steps to Install Hive
Below are the steps to install hive:
Step 1: Download the tar file.
Step 2: Extract the file.
sudo tar zxvf /Downloads/apache-hive-* -C /usr/local
Step 3: Move apache files to /usr/local/hive directory.
sudo mv /usr/local/apache-hive-* /usr/local/hive
Step 4: Set up the Hive environment by appending the following lines to ~/.bashrc file
Step 5: Execute the bashrc file.
$ source ~/.bashrc
Step 6: Hive Configuration- Edit hive-env.sh file to append this:
4.5 (2,372 ratings)
Step 7: Edit using the below commands:
$ cd $HIVE_HOME/conf
$ cp hive-env.sh.template hive-env.sh
- Now to verify the hive is installed or not, use command hive-version.
- Here, hive-version enters the hive shell which means the hive is installed. However in my case it is the older version hence giving the warning.
Conclusion – Hive Installation
Hive opens up the big data to a lot of people because of its easiness and similar nature to SQL like query language and interfaces. Hive is built on Hadoop core as it uses Mapreduce for execution. Much easy to retrieve the data and do processing of Big Data.
This is a guide to Hive Installation. Here we discuss some prerequisites to install hive on any machine and how to install hive in steps for better understanding. You can also go through our other related articles to learn more-