hive安装指南

1.下载apache-hive-2.3.3-bin.tar.gz

2.解压,进入目录,根据模板文件,重新生成新的hive-env.sh,hive-site.xml

3.编辑hive-env.sh 主要是这两个参数 HADOOP_HOME=/opt/soft/hadoop-2.7.5 # Hive Configuration Directory can be controlled by: export HIVE_CONF_DIR=/opt/soft/hive-2.1.1/conf

4.编辑hive-site.xml 有三个参数与mysql相关,我们把hive元数据放在mysql中

mysql 用户名javax.jdo.option.ConnectionUserNameusername     Username to use against metastore database  

mysql 密码       javax.jdo.option.ConnectionPassword     password     password to use against metastore database  

连接url       javax.jdo.option.ConnectionURL     jdbc:mysql://centos-1:3306/hivedb?createDatabaseIfNotExist=true           JDBC connect string for a JDBC metastore.       To use SSL to encrypt/authenticate the connection, provide database-specific SSL flag in the connection URL.       For example, jdbc:postgresql://myhost/db?ssl=true for postgres database.      

还有四个地方会出现这个${system:java.io.tmpdir%,这个新建一个目录,替换掉,system:user.name%也是同理 不然启动会报错 还有一个报元数据版本不对,报错,百度就行了

5.复制一个mysql驱动包到lib目录下

6.初始化元数据库 bin/schematool -initSchema -dbType mysql

7.启动hive 8.测试hive  

你可能感兴趣的:(hive)