hive下载安装与配置
一、準(zhǔn)備工作
安裝hive的前提是已經(jīng)在主機(jī)中安裝好JDK、hadoop、mysql如果準(zhǔn)備還沒有安裝這樣三個,可以參考如下文章安裝
JDK:https://blog.csdn.net/qq_42668255/article/details/97368887
hadoop:https://blog.csdn.net/qq_42668255/article/details/91385098
mysql:https://blog.csdn.net/qq_42668255/article/details/93979412
二、下載
hive官方下載網(wǎng)址:http://mirror.bit.edu.cn/apache/hive/
msyql官方下載:https://dev.mysql.com/downloads/repo/apt/
本人云盤資源:https://pan.baidu.com/s/1K6jPY4OjWV_PI4YMAnPdnw
提取碼:avej
三、安裝
hadoop fs -mkdir -p /user/hive/warehouse
hadoop fs -mkdir -p /user/hive/tmp?
hadoop fs -mkdir -p /user/hive/log?
hadoop fs -chmod -R 777 /user/hive/warehouse?
hadoop fs -chmod -R 777 /user/hive/tmp?
hadoop fs -chmod -R 777 /user/hive/log
<property>
??? <name>hive.metastore.warehouse.dir</name>
??? <value>/user/hive/warehouse</value>
??? <description>location of default database for the warehouse</description>
? </property><property>?
??? <name>hive.exec.scratchdir</name>?
??? <value>/user/hive/tmp</value>?
</property><property>
??? <name>hive.querylog.location</name>
??? <value>/user/hive/log</value>
??? <description>Location of Hive run time structured log file</description>
</property>
連接Mysql數(shù)據(jù)庫
<property>
??? <name>javax.jdo.option.ConnectionURL</name>
??? <value>jdbc:mysql://192.168.174.138:3306/hive?createDatabaseIfNotExist=true</value>? 此地址為本機(jī)ip地址
??? <description>
????? 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.
??? </description>
? </property>
//驅(qū)動路徑
<property>
??? <name>javax.jdo.option.ConnectionDriverName</name>
??? <value>com.mysql.jdbc.Driver</value>
??? <description>Driver class name for a JDBC metastore</description>
</property>
登陸mysql用戶名
<property>
??? <name>javax.jdo.option.ConnectionUserName</name>
??? <value>root</value>
??? <description>Username to use against metastore database</description>
</property>
//登陸mysql的密碼
<property>
??? <name>javax.jdo.option.ConnectionPassword</name>
??? <value>a</value>
??? <description>password to use against metastore database</description>
</property>
export HIVE_CONF_DIR=/home/ubuntu/hive-2.2.0/conf
export HIVE_AUX_JARS_PATH=/home/ubuntu/hive-2.2.0/bin
mkdir?/usr/local/hive122/tmp
并在?hive-site.xml?中修改:把{system:java.io.tmpdir}?改成/usr/local/hive122/tmp(三處)
把?{system:user.name}?改成?{user.name}? (兩處)
cd ?/usr/local/hive122/bin/
./schematool -initSchema -dbType mysql
?
?
?
?
?
?
總結(jié)
以上是生活随笔為你收集整理的hive下载安装与配置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: mysql8用户管理
- 下一篇: monthdiff oracle_Ora
