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