赞
踩
备份下载地址:
1 mysql 驱动
https://download.csdn.net/download/cs261244787/13721913
2 hive2.3.7
https://download.csdn.net/download/cs261244787/13721810
wget https://mirrors.tuna.tsinghua.edu.cn/apache/hive/hive-2.3.7/apache-hive-2.3.7-bin.tar.gz
tar -zxvf apache-hive-2.3.7-bin.tar.gz
cp mysql-connector-java-5.1.48.jar apache-hive-2.3.7-bin/
进入 conf 除了 DriverName不用修改。 其余都要修改
<configuration>
<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/hdfs/tmp</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://修改:3306/metastore?characterEncoding=utf8&useSSL=false</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>hive</value>
<description>username to use against metastore database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>修改</value>
<description>password to use against metastore database</description>
</property>
<property>
<name>hive.metastore.schema.verification</name>
<value>true</value>
</property>
<!-- local dir -->
<property>
<name>hive.exec.local.scratchdir</name>
<value>/opt/hadoop/apache-hive-2.3.7-bin/tmp/hive</value>
</property>
<property>
<name>hive.querylog.location</name>
<value>/opt/hadoop/apache-hive-2.3.7-bin/logs/hive</value>
</property>
<property>
<name>hive.server2.authentication</name>
<value>NONE</value>
</property>
<property>
<name>hive.server2.thrift.bind.host</name>
<value>修改</value>
</property>
<property>
<name>hive.server2.thrift.port</name>
<value>10000</value>
<description>TCP port number to listen on, default 10000</description>
</property>
<property>
<name>hive.server2.thrift.http.port</name>
<value>10001</value>
</property>
<property>
<name>hive.server2.thrift.client.user</name>
<value>修改</value>
<description>Username to use against thrift client</description>
</property>
<property>
<name>hive.server2.thrift.client.password</name>
<value>修改</value>
<description>Password to use against thrift client</description>
</property>
</configuration>
[wftapp@biz-145 conf]$ vim /etc/profile
[wftapp@biz-145 conf]$ sudo vim /etc/profile
[wftapp@biz-145 conf]$ source /etc/profile
[wftapp@biz-145 conf]$ cat /etc/profile |grep HIVE
export HIVE_HOME=/opt/hadoop/hive
export PATH=$PATH:$HIVE_HOME/bin
hive-env.sh 授权
vim conf/hive-env.sh
授权 给 tmp hive job 会使用到
hdfs dfs -ls /tmp
hdfs dfs -chmod -R 777 /user/hdfs/tmp
hdfs dfs -chmod -R 777 /tmp
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。