first, the environment preparation
JDK 1.8+
Hadoop 2.x
MySQL 5.x
Please ensure that the above environment is ready before installation
Second, installation
1. Download and unzip
Enter the directory after decompression, using the current path configuration Hive_home
2. Enter the Conf directory under the installation directory
Vim Hive-site.xml
Add the following configuration
<?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://worker2: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>root</value> </property> <property> <name>javax.jdo.option.connectionpassword </name> <value>root</ value> </property></ Configuration>
Modify the hive-config.sh in the Bin directory under the installation directory
Vim hive-config.sh
Add the following configurations:
Export Java_home=/wxm/software/java/jdk8/jdk1.8.0_91export hive_home=/wxm/software/hive/ Apache-hive-2.1.0-binexport hadoop_home=/wxm/software/hadoop/hadoop2.7.2/hadoop-2.7.2123
Initializing meta data
In/schematool -dbtype MySQL -initschema
Start and test
Bin/hive
Create Database test_1121;
Use test_1121;
CREATE TABLE Student (ID int,name string);
INSERT into student values (1, ' Test ');
SELECT * from student;
This article is from the "10891776" blog, please be sure to keep this source http://10901776.blog.51cto.com/10891776/1875167
hive2.1.0 installation and MySQL meta data management configuration