hive0.13.1 installation process on hadoop2.4.1 pseudo-distributed deployment
Environment: Redhat enterprice 6.5 +hadoop2.4.1+hive0.13.1+mysql Single-node pseudo-distributed deployment
Related website:
Hive Official Website Installation Guide: https://cwiki.apache.org/confluence/display/Hive/GettingStarted#GettingStarted-InstallingHivefromaStableRelease
Three ways to save Hive's Metastore: https://cwiki.apache.org/confluence/display/Hive/AdminManual+MetastoreAdmin
Hive Installation Configuration: Http://wenku.baidu.com/link?url=Lpp_ Crrpenaluf2u97tfr7zc5hrrikqxjfjrgzvgeqlh6t857ehdfruk4ocqephb0qehmlu1u_fgqpdpfae4mznnzzgav8o7cwox5jbr_ao
For distributed hadoop2.2.0+hive1.2.0 configuration: http://www.kankanews.com/ICkengine/archives/72851.shtml
Step1 installing MySQL
Step2 creating databases in MySQL database hive is used to store metastore data while creating a user who can enter hive
' Hadoop '@'localhost'123456';mysql> Grant All Privileges on hive. ' Hadoop '@'localhost' with GRANT option;
mysql> flush Privileges;
step3 Download the compiled hive package:http://mirrors.cnnic.cn/apache/hive/stable/apache-hive-0.13.1-bin.tar.gz
Step4 Decompression apache-hive-0.13.1-bin.tar.gz Bag
TAR-ZXVF apache-hive-0.13.1-bin.tar.gz-c/opt/
STEP5 Configuring hive-related files
A. Configure the Hive-site.xml file in hive/conf (the default does not have this file, we copy the Hive-default.xml.template, and then change the name to Hive-site.xml. Replace the configuration information with the following)
<property>
<name>hive.metastore.uris</name>
<value></value>
<description> here value is NULL, indicating hive.metastore.local is true</description>
</property>
< Property> <name>Javax.jdo.option.ConnectionURL</name> <value>Jdbc:mysql://localhost:3306/hive?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>Hadoop</value> </ Property> < Property> <name>Javax.jdo.option.ConnectionPassword</name> <value>123456</value> </ Property>
B. Copy the MySQL JDBC driver package to the Hive/lib directory (if there is no Lib directory to build one yourself).
:http://dev.mysql.com/downloads/connector/j/
Step6. Test: Go into the/opt/apache-hive-0.13.1-bin/bin/directory and execute hive into hive and execute show tables;
# Cd/opt/apache-hive-0.13 . 1 -bin/08 /09 20 : 09 : insteadlogging initialized using configuration in jar:file :/opt/apache-hive-0.13 . 1 -bin/lib/hive-common-1 . jar! /hive-log4j.propertieshive > Show tables;
OK
Time taken:1.61 seconds, fetched:1 row (s)
Hive>
If you do not make an error, it indicates that hive based on the standalone metabase has been installed successfully.