0% found this document useful (0 votes)
75 views

Hive Main Installation

This document provides instructions for installing Hive on a Linux system: 1. Download the latest versions of Hive and Derby database binaries from the Apache websites. 2. Extract the binaries to /usr/local and configure environment variables for the Hive home and classpath. 3. Create Hive data and temp directories in HDFS and change permissions so Hive can access them. 4. Configure Hive by copying and editing configuration files hive-env.sh and hive-site.xml to connect to a MySQL metastore database. 5. Install the MySQL JDBC connector and initialize the metastore schema to complete the Hive installation.

Uploaded by

pareek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

Hive Main Installation

This document provides instructions for installing Hive on a Linux system: 1. Download the latest versions of Hive and Derby database binaries from the Apache websites. 2. Extract the binaries to /usr/local and configure environment variables for the Hive home and classpath. 3. Create Hive data and temp directories in HDFS and change permissions so Hive can access them. 4. Configure Hive by copying and editing configuration files hive-env.sh and hive-site.xml to connect to a MySQL metastore database. 5. Install the MySQL JDBC connector and initialize the metastore schema to complete the Hive installation.

Uploaded by

pareek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

#hive installation

1. Download latest hive binary tar.gz from this link


https://hive.apache.org/downloads.html

2. Download derby database binary package from this link


https://db.apache.org/derby/derby_downloads.html

3. Now extract hive and derby binary package to /usr/local

#sudo tar zxf apache-hive-x.y.z-bin.tar.gz


#sudo mv apache-hive-x.y.z-bin /usr/local/hive
#sudo chown hadoop:hadoop -R /usr/local/hive

4. vim ~/.bashrc

#hive variables starts here


export HIVE_HOME=/usr/local/hive
export HIVE_CONF_DIR=/usr/local/hive/conf
export PATH=$HIVE_HOME/bin:$PATH
export CLASSPATH=$CLASSPATH:/usr/local/hadoop/lib/*:.
export CLASSPATH=$CLASSPATH:/usr/local/hive/lib/*:.
#hive variables end here

5. create a hive datawarehouse inside your hdfs filesystem by this command


#hdfs dfs -mkdir -p /user/hive/warehouse
---> also temp folder for temp files
#hdfs dfs -mkdir /tmp
---> change permission of both folder so that hive can work on them eaisly
#hdfs dfs -chmod g+w /user/hive/warehouse
#hdfs dfs -chmod g+w /tmp

6. Copy hive-env.sh and hive-site.xml and edit them


#cd /usr/local/hive/conf
#cp hive-env.sh.template hive-env.sh
#vim hive-env.sh --->append HADOOP_HOME path to this file
export HADOOP_HOME=/usr/local/hadoop
#vim hive-site.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>

<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost/metastore?
createDatabaseIfNotExist=true</value>
</property>

<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>

<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>root</value>
</property>

<property>
<name>datanucleus.autoCreateSchema</name>
<value>true</value>
</property>

<property>
<name>datanucleus.fixedDatastore</name>
<value>true</value>
</property>

<property>
<name>datanucleus.autoCreateTables</name>
<value>True</value>
</property>

</configuration>

7. also copy your mysql connectors to hive lib so that hive can use mysql
#cp /path/to/connectory/mysql-connectors-java-x.y.z.jar /usr/local/hive/lib
--->create schema of metastore in msql using this command
#source ~/.bashrc
#schematool -dbType mysql -initSchema
---> it will generate schema of metastore

8. verify hive installation by firing command hive


#hive
hive > show databases;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy