Hive - hive 安装部署

发布时间 2023-06-07 00:41:37作者: HOUHUILIN

Hadoop - 分布式部署 > Hive - 安装部署

 

 

 

准备工作

安装部署

 

 

 

 

准备工作

Hive版本:apache-hive-3.1.2

Hive官网:https://hive.apache.org/

Hive下载地址:https://downloads.apache.org/hive/

角色部署:

节点 node01 node02 node03
server    
client

 

 

安装部署

1、将 apache-hive-3.1.2-bin.tar.gz上传到 node03节点的 /opt/software 目录下,并解压到 /opt/module目录

[root@node03 software]# tar -zxvf apache-hive-3.1.2-bin.tar.gz -C /opt/module/
[root@node03 software]# cd /opt/module/apache-hive-3.1.2-bin
[root@node03 apache-hive-3.1.2-bin]# ll
total 56
drwxr-xr-x 3 root root   157 Jun  7 00:19 bin
drwxr-xr-x 2 root root  4096 Jun  7 00:19 binary-package-licenses
drwxr-xr-x 2 root root  4096 Jun  7 00:19 conf
drwxr-xr-x 4 root root    34 Jun  7 00:19 examples
drwxr-xr-x 7 root root    68 Jun  7 00:19 hcatalog
drwxr-xr-x 2 root root    44 Jun  7 00:19 jdbc
drwxr-xr-x 4 root root 12288 Jun  7 00:19 lib
-rw-r--r-- 1 root root 20798 Aug 23  2019 LICENSE
-rw-r--r-- 1 root root   230 Aug 23  2019 NOTICE
-rw-r--r-- 1 root root  2469 Aug 23  2019 RELEASE_NOTES.txt
drwxr-xr-x 4 root root    35 Jun  7 00:19 scripts

2、修改配置文件 hive-env.sh,配置HADOOP_HOME

# 查看解压后的hive目录
[root@node03 apache-hive-3.1.2-bin]# cd conf/
[root@node03 conf]# ll
total 332
-rw-r--r-- 1 root root   1596 Aug 23  2019 beeline-log4j2.properties.template
-rw-r--r-- 1 root root 300482 Aug 23  2019 hive-default.xml.template
-rw-r--r-- 1 root root   2365 Aug 23  2019 hive-env.sh.template
-rw-r--r-- 1 root root   2274 Aug 23  2019 hive-exec-log4j2.properties.template
-rw-r--r-- 1 root root   3086 Aug 23  2019 hive-log4j2.properties.template
-rw-r--r-- 1 root root   2060 Aug 23  2019 ivysettings.xml
-rw-r--r-- 1 root root   3558 Aug 23  2019 llap-cli-log4j2.properties.template
-rw-r--r-- 1 root root   7163 Aug 23  2019 llap-daemon-log4j2.properties.template
-rw-r--r-- 1 root root   2662 Aug 23  2019 parquet-logging.properties

# 备份 hive-env.sh
[root@node03 conf]# cp -a hive-env.sh.template hive-env.sh
# 配置HADOOP_HOME
[root@node03 conf]# vim hive-env.sh
# 已配置HADOOP_HOME路径
[root@node03 conf]# cat hive-env.sh | grep -i HADOOP_HOME
# Set HADOOP_HOME to point to a specific hadoop install directory
# HADOOP_HOME=${bin}/../../hadoop
HADOOP_HOME=/opt/module/hadoop-2.5.2
[root@node03 conf]#

3、启动Zookeeper、HDFS(ZKFC、JournalNode、NameNode、DataNode)、Yarn(ResourceManager、NodeManager)

# 启动Zookeeper
cd /opt/module/zookeeper-3.4.5
bin/zkServer.sh restart
# 启动HDFS&Yarn
cd /opt/module/hadoop-2.5.2
sbin/start-all.sh

4、初始化(dbtype = derby)

 

 

 

未完待续(太困了o(╥﹏╥)o)