First step: Prepare hive and MySQL installation package
Download Hive 1.1.1 Address: http://www.eu.apache.org/dist/hive/
Download MySQL JDBC 5.1.38 driver: http://dev.mysql.com/downloads/connector/j/
Second step: Install MySQL directly, can be installed with sudo apt-get install Mysql-server mysql-client, after installation check whether to start
Step three: Enter MySQL as root, create DATABASE hive and user Hadoop
- - p; Create Database Hive; GRANT All on Hive. * to [Email protected] ' localhost ' by ' Hadoop ' Privileges;
Fourth step: Unzip apache-hive-1.1.1-bin.tar.gz to/usr/local/hadoop/hive, I previously installed Hadoop in/usr/local/hadoop
Tar–zxvf/usr/local/hadoop/hive apache-hive-1.1.1-bin.tar.gz
Fifth step: Create Hive-site.xml in/usr/local/hadoop/hive/apache-hive-1.1.1-bin/conf, as follows:
Sixth step: Add the following 3 export statements in/usr/local/hadoop/hive/apache-hive-1.1.1-bin/bin/modify hive-config.sh
Seventh step: Copy the Jline-2.12.jar from the downloaded mysql-connector-java-5.1.38 to the/usr/local/hadoop/hive/apache-hive-1.1.1-bin/lib/
Cp/home/hadoop/mysql-connector-java-5.1.38/jline-2.12.jar/usr/local/hadoop/hive/apache-hive-1.1.1-bin/lib
Eighth step: Add as Root at the end of the/etc/profile file
Use Source/etc/profile to make a new configuration effective
Nineth step: Switch to Hadopp user, start MySQL and Hadoop and run hive under/usr/local/hadoop/hive/apache-hive-1.1.1-bin/with bin/hive
Display the database and create a test table with data of 0 in the selection table, indicating that hive can function properly
Install hive under Ubuntu + hadoop2.6.0