Install Hive in Ubuntu13.10

Source: Internet
Author: User
Host environment: Ubuntu13.10Hadoop1.2.1Hive0.12.0 download, unzip, and transfer: wgethttp: // uninstall

Host environment:

Ubuntu 13.10

Hadoop 1.2.1

Hive 0.12.0

Download, decompress, and transfer:

Wget http://mirrors.hust.edu.cn/apache/hive/hive-0.12.0/hive-0.12.0.tar.gz
Tar-xzvf hive-0.12.0.tar.gz
Mv hive-0.12.0/opt/

Configure system environment variables:

Sudo vim/etc/profile
Source/etc/profile

Modify hive configuration document

User-Defined profile: hive-site.xml

Default profile: hive-default.xml

The user-defined configuration file will overwrite the default configuration file, and Hive will also read the Hadoop configuration, because Hive is started as a Hadoop client.

Cd conf
Cp hive-default.xml.template hive-site.xml

Main Hive configuration items:

Hive. metastore. warehouse. dir specifies the Hive storage directory

Hive.exe c. scratchdir specifies the directory of temporary hive data files

Database Connection Configuration:

Hive needs to store metadata in RDBMS and configure mysql to store Hive metadata


Javax. jdo. option. ConnectionURL
Jdbc: mysql: // localhost: 3306/hive? CreateDatabaseIfNotExist = true
JDBC connect string for a JDBC metastore


Javax. jdo. option. ConnectionDriverName
Com. mysql. jdbc. Driver
Driver class name for a JDBC metastore

...........................
...........................

Javax. jdo. option. ConnectionUserName
Root
Username to use against metastore database


Javax. jdo. option. ConnectionPassword
111111
Password to use against metastore database

Copy the JDBC driver to $ HIVE_HOME/lib.

Cp/home/dat/mysql-connector-java-5.1.24-bin.jar/opt/hive-0.12.0/lib/

Install Mysql and start mysql ..

Check the mysql startup status:

Sudo service mysql. server status

Start Hive

/Opt/hive-0.12.0/bin $ hive

Error:

Cannot find hadoop installation: $ HADOOP_HOME or $ HADOOP_PREFIX must be set or hadoop must be in the path

Reason hadoop is not enabled, easy to handle: source/opt/hadoop-1.2.1/conf/hadoop-env.sh

Continue to start. continue to report the following error:

Caused by: org. xml. sax. SAXParseException; systemId: file:/opt/hive-0.12.0/conf/hive-site.xml; lineNumber: 2000; columnNumber: 16; element type "value" must be marked by the end of the match""Termination.


Cause: there is a problem with the xml file, 2000 rows Paired, changed to vaule

Restart again. OK!

Dat @ dat-HP:/opt/hive-0.12.0/bin $ hive

Logging initialized using configuration in jar: file:/opt/hive-0.12.0/lib/hive-common-0.12.0.jar! Hive-log4j.properties
Hive>

For more details, refer to the highlights on the next page.: Http://www.linuxidc.com/Linux/2013-11/92525p2.htm

Hive details: Click here
Hive: Click here

Reading:

Hive installation http://www.linuxidc.com/Linux/2013-07/87952.htm Based on Hadoop Cluster

Differences between Hive internal tables and external tables http://www.linuxidc.com/Linux/2013-07/87313.htm

Hadoop + Hive + Map + reduce cluster installation and deployment http://www.linuxidc.com/Linux/2013-07/86959.htm

Http://www.linuxidc.com/Linux/2013-06/86104.htm installation in Hive local standalone Mode

WordCount word statistics http://www.linuxidc.com/Linux/2013-04/82874.htm for Hive Learning

Ubuntu 13.10 text tutorial on hard drive installation in Windows 7See http://www.linuxidc.com/Linux/2013-10/91565.htm

Download, install, and configure Ubuntu 13.10Page http://www.linuxidc.com/Linux/2013-10/91564.htm

Related Article

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.