Wednesday, 23 May 2018

[Apache Hive] Install Hive2

Requirements

Java Version

- Hive version 1.2부터 Java 1.7 이상 버전이 필요
- Hive version 0.14~1.1까지는 Java 1.6에서도 구동 가능
- Java 1.8을 사용할 것을 권장

Hadoop Version

- Hadoop 2.x 를 권장
- Hadoop 1.x 도 가능하나 Hive 2.0.0 부터 지원 X



1. Download Hive

#> cd /usr/local
#> wget http://mirror.apache-kr.org/hive/hive-2.3.0/apache-hive-2.3.0-bin.tar.gz




2. Unzip Hive Install File

#> tar zxf apache-hive-2.3.0-bin.tar.gz





3. Setup Environment Variables







4. Create Hive Meta Store Directory and Change Mode in HDFS

#> hadoop fs -mkdir /tmp
#> hadoop fs -mkdir /user
#> hadoop fs -mkdir /user/hive
#> hadoop fs -mkdir /user/hive/warehouse
#> hadoop fs -chmod g+w /tmp
#> hadoop fs -chmod g+w /user/hive/warehouse





5. Initialize Schema as DB Type 'derby'

#> schematool -dbType derby -initSchema





6. Start Hive Server

#> hiverserver2 &




No comments:

Post a Comment