Ubuntu16.04 Install apache-hive-2.3.0-bin.tar.gz

Source: Internet
Author: User
Tags mysql view

Installing Mysql-server
Apt-get Install Mysql-server

Download hive
sudo wget http://mirrors.hust.edu.cn/apache/hive/hive-2.3.0/apache-hive-2.3.0-bin.tar.gz
Extract Hive
sudo tar zxvf apache-hive-2.3.0-bin.tar.gz
sudo mv Apache-hive-2.3.0-bin.tar.gz/opt/hive

Environment variables
sudo vim/etc/profile.d/hive-en.sh

Export Hive_home=/opt/hive
Export Hcat_home= $HIVE _home/hcatalog
Export hive_conf= $HIVE _home/conf
Export path= $PATH: $HIVE _home/bin

source/etc/profile.d/hive-en.sh
Echo $HIVE-home

Hive Configuration
cd/opt/hive/conf/
Configure Hive.site.xml
CP Hive-default.xml.template Hive.site.xml

sudo gedit hive-site.xml

Configuration:
<name>javax.jdo.option.ConnectionPassword</name>
<value>root</value>

<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>

<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>

<name>hive.metastore.schema.verification</name>
<value>false</value>

<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>

The following few configurations do not replicate to the penultimate line:
<property>
<name>datanucleus.schema.autoCreateSchema</name>
<value>true</value>
</property>

<property>
<name>datanucleus.schema.autoCreateSchema</name>
<value>true</value>
</property>

<property>
<name>datanucleus.schema.autoCreateTables</name>
<value>true</value>
</property>

<property>
<name>datanucleus.schema.autoCreateColumns</name>
<value>true</value>
</property>

Replace ${system:java.io.tmpdir}/tmp
Replace ${system:user.name} with Root


Check the JDBC Package
Cd/opt/hive/lib

https://dev.mysql.com/downloads/connector/j/
Download unzip copy to

Creating a Hive Database
Hive
Show tables;

Gedit/tmp/donny/hive.log Viewing exceptions

MySQL View
New open Window
Mysql-uroot-p
show databases;

Ubuntu16.04 Install apache-hive-2.3.0-bin.tar.gz

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.