centos7+hive-1.2.1安裝教程

一、下載hive1.2.1

下載地址


二、上傳至linux並解壓

[root@master apps]# tar -zxvf apache-hive-1.2.1-bin.tar.gz
[root@master apps]# cd hive-1.2.1/
[root@master hive-1.2.1]# ll
總用量 464
drwxr-xr-x. 4 root root    156 7月   5 18:29 bin
drwxr-xr-x. 2 root root    212 7月   5 18:28 conf
drwxr-xr-x. 4 root root     34 7月   5 18:28 examples
drwxr-xr-x. 7 root root     68 7月   5 18:28 hcatalog
drwxr-xr-x. 4 root root   8192 7月   5 18:28 lib
-rw-rw-r--. 1 root root  24754 4月  30 2015 LICENSE
-rw-rw-r--. 1 root root    397 6月  19 2015 NOTICE
-rw-rw-r--. 1 root root   4366 6月  19 2015 README.txt
-rw-rw-r--. 1 root root 421129 6月  19 2015 RELEASE_NOTES.txt
drwxr-xr-x. 3 root root     23 7月   5 18:28 scripts
[root@master hive-1.2.1]# 

三、解壓後即可使用

1、啓動hdfs

2、啓動yarn

3、啓動hive(正常啓動)

[root@master hive-1.2.1]# bin/hive

Logging initialized using configuration in jar:file:/apps/hive-1.2.1/lib/hive-common-1.2.1.jar!/hive-log4j.properties
hive> 

可能會出現的錯誤


jar包版本衝突

解決辦法

[root@master /]# cd /apps/hive-1.2.1/lib/
[root@master lib]# ll
總用量 95280
查找 jline-2.12.jar
-rw-rw-r--.  1 root root   213854 4月  30 2015 jline-2.12.jar

然後進入(/apps/hadoop-2.8.0/share/hadoop/yarn/lib)

[root@master lib]# cd /apps/hadoop-2.8.0/share/hadoop/yarn/lib

在這個目錄下有 jline.jar包與(/apps/hive-1.2.1/lib/)下的jline-2.12.jar版本不一致。

將其替換爲兩者最高版本。

然後繼續啓動

[root@master lib]# cd /apps/hive-1.2.1/
[root@master hive-1.2.1]# bin/hive

Logging initialized using configuration in jar:file:/apps/hive-1.2.1/lib/hive-common-1.2.1.jar!/hive-log4j.properties
hive> 
安裝成功!!!!!!


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章