下载上传apache-hive-2.1.1-bin.tar.gz文件并解压
tar -zxvf apache-hive-2.1.1-bin.tar.gz -C /export/servers
配置环境变量
vi /etc/profile
export HIVE_HOME=/export/servers/apache-hive-2.1.1-bin
export PATH=$PATH:$HIVE_HOME/bin
source /etc/profile
hive文件配置
进入配置文件目录
# >cd /home/bigdata/hive/conf
将hive-default.xml.template文件拷贝并重命名成hive-site.xml
# >mv hive-default.xml.template hive-site.xml
清空文件中<configuration></configuration>之间的内容并加入下列内容:
<property>
<name>hive.metastore.schema.verification</name>
<value>false</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://机器名:3306/hive?characterEncoding=UTF-8&useSSL=false</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>mysql账号</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>mysql密码</value>
</property>
启动(dfs、zk、yarn)
安装时执行(以后不需要执行)
schematool -initSchema -dbType mysql
启动
hive
来源:oschina
链接:https://my.oschina.net/u/4427158/blog/3161127