首先上传hive的安装包
在这我使用的市1.2.1版本的
tar -zxvf apache-hive-1.2.1-bin.tar.gz -C /opt/module
tar -zxvf 包名 -C 安装包的目录
配置环境变量sudo vi /etc/profile
将下面这段写上去
#hive
export HIVE_HOME=/opt/module/hive(此处为hive的解压目录)
export PATH=
P
A
T
H
:
PATH:
PATH:HIVE_HOME/bin
重启服务
source /etc/profile
cd /opt/module/hive/conf
vi hive-env.sh.template
进入后如下图位置按照实际情况填写
schematool -initSchema -dbType mysql
启动hive最后启动hive
首先将hadoop运行起来
start-dfs.sh
start-yarn.sh
将hadoop启动后输入hive
启动hive



