其他分享
首页 > 其他分享> > Hive 前提 安装

Hive 前提 安装

作者:互联网

前提

mysql>create database hive character set utf8;
mysql>flush privileges;
mysql>show databases;

安装

tar -zxvf apache-hive-1.2.1-bin.tar.gz -C /usr/local/src/
cd  /usr/local/src/
mv apache-hive-1.2.1-bin/ hive-1.2.1

 cd /usr/local/src/hive-1.2.1/conf/
 cp hive-env.sh.template hive-env.sh
 cp hive-default.xml.template hive-site.xml

<property>
    <name>javax.jdo.option.ConnectionURL</name>		
 <value>jdbc:mysql://10.3.26.113:3306/hive?=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>hive</value>
    <description>Username to use against metastore database</description>
  </property>
<property>
    <name>javax.jdo.option.ConnectionPassword</name>
    <value>hive</value>
    <description>password to use against metastore database</description>
  </property>

以下内容进行修改

<property>
    <name>hive.querylog.location</name>
    <valuo>/usr/local/src/hive-1.2.1/tmp</value>
</description>Location of Hive run time structured log file</description>
</property>

<property>
    	<name>hive.exec.scratchdir</name>
    	<value>/usr/local/src/hive-1.2.1/tmp</value>
</property>


<property>
    	<name>hive.exec.local.scratchdir</name>
    	<value>/usr/local/src/hive-1.2.1/tmp</value>
</property>

<property>
    <name>hive.downloaded.resources.dir</name>
    <value>/usr/local/src/hive-1.2.1/tmp</value>
    <description>Temporary local directory for added resources in the remote file system.</description>
  </property>

mysql> use hive;
mysql> show tables;

标签:src,1.2,安装,hive,前提,mysql,Hive,local,usr
来源: https://blog.csdn.net/SmionFox/article/details/101297239