Hive安装与部署

1.下载hive

http://apache.org/dist/hive/  官网
https://mirrors.tuna.tsinghua.edu.cn/apache/hive/  清华镜像
选择带有bin.tar的

2.将安装包进行解压

3. 配置环境变量

export HIVE_HOME=/usr/local/hive
export PATH=$PATH:$HIVE_HOME/bin

image

4. 配置hive-env.sh

先复制一份hive-env.sh.template为hive-env.sh

4.1 添加以下内容

export HIVE_CONF_DIR=/usr/local/hive/conf
export JAVA_HOME=/usr/local/jdk
export HADOOP_HOME=/usr/local/hadoop
export HIVE_AUX_JARS_PATH=/usr/local/hive/lib

image

5. 配置hive-site.xml

复制一份hive-default.xml.template为hive-site.xml

5.1 将${system:java.io.tmpdir}替换成/usr/local/hive/iotmp


输入shell指令进行替换

:%s#${system:java.io.tmpdir}#/usr/local/hive/iotmp#g

image


配置后


image

5.2 将${system:user.name}替换成当前用户名root


输入shell指令进行替换

:%s/${system:user.name}/root

配置前


image


配置后


image

posted @ 2022-02-27 12:13  递茶大户  阅读(81)  评论(0编辑  收藏  举报