1.下載hive2.3.5 解壓縮並更名爲hive目錄,放到/usr/local下(注意權限)apache
sudo mv apache-hive-2.3.5-bin /usr/local/hivebash
2.修改目錄全部者 /usr/local/下的hive文件夾oop
sudo chown -R 用戶名 /usr/local/hivespa
3.設置環境變量xml
(1)進入 sudo gedit ~/.bashrcblog
#~/.bashrchadoop
#hive環境變量it
export HIVE_HOME=/usr/local/hive變量
export PATH=$PATH:$HIVE_HOME/bin配置
#讓環境變量生效
source ~/.bashrc
(2)配置hive-env.sh.template
將/usr/local/hive/conf/hive-env.sh.template更名爲hive-env.sh
(3)配置hive-default.xml.template
將/usr/local/hive/conf/hive-default.xml.template更名爲hive-default.xml
(4)配置hive-env.sh
export HADOOP_HOME=/usr/local/hadoop
export HIVE_CONF_DIR=/usr/local/hive/conf
4進入hive
Hive