Install hive under Ubuntu + hadoop2.6.0

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.