hive安装
Posted happy-dream
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hive安装相关的知识,希望对你有一定的参考价值。
1. 下载hive
wget http://mirrors.hust.edu.cn/apache/hive/stable-2/apache-hive-2.3.3-bin.tar.gz
2. 解压tar -zxvf apache-hive-2.3.3-bin.tar.gz
3. cp apache-hive-2.3.3-bin.tar.gz /usr/local/hive/
4. 已安装mysql
未安装请查看我的mysql安装篇
5. cd /usr/local/apache-hive-2.3.3-bin/conf
vim hive-site.xml
<configuration> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://localhost:3306/hivedb?createDatabaseIfNotExist=true</value> <description>JDBC connect string for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>com.mysql.jdbc.Driver</value> <description>Driver class name for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionUserName</name> <value>root</value> <description>username to use against metastore database</description> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>root</value> <description>password to use against metastore database</description> </property> </configuration>
6. 添加mysql驱动包
放入 /usr/local/apache-hive-2.3.3-bin/lib
7. vim /etc/profile
#Hive
export HIVE_HOME=/usr/local/hive/apache-hive-2.3.3-bin
export PATH=$PATH:$HIVE_HOME/bin
source /etc/profile
8.初始化hive
schematool -dbType mysql -initSchema
以上是关于hive安装的主要内容,如果未能解决你的问题,请参考以下文章
在Tomcat的安装目录下conf目录下的server.xml文件中增加一个xml代码片段,该代码片段中每个属性的含义与用途