zoukankan      html  css  js  c++  java
  • 安装hive

    1.下载hive安装包

    http://www.eu.apache.org/dist/hive/stable/apache-hive-1.2.2-bin.tar.gz

    2.将apache-hive-1.2.2-bin.tar.gz上传到/usr/local/src目录下,解压

    tar -zxvf apache-hive-1.2.2-bin.tar.gz

    3.配置hive-site.xml

    进入conf目录

    cp hive-default.xml.template hive-site.xml

    在hive-site.xml文件开头增加如下配置

    <property>
        <name>system:java.io.tmpdir</name>
        <value>/tmp/hive/java</value>
    </property>
    <property>
        <name>system:user.name</name>
        <value>${user.name}</value>
    </property>

    在hive-site.xml文件末尾增加如下配置

    <property>
          <name>javax.jdo.option.ConnectionURL</name>
          <value>jdbc:mysql://localhost: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>root</value>
          <description>Username to use against metastore database</description>
      </property>
      <property>
          <name>javax.jdo.option.ConnectionPassword</name>
          <value>111111</value>
          <description>password to use against metastore database</description>
      </property>    

    4.配置hive-env.sh

    cp hive-env.sh.template hive-env.sh

    修改hive-env.sh文件:

    HADOOP_HOME=/usr/local/src/hadoop-2.6.5
    JAVA_HOME=/usr/local/src/jdk1.8.0_172
    HIVE_HOME=/usr/local/src/apache-hive-1.2.2-bin

    5.把mysql-connector-java-5.1.41-bin.jar拷贝到hive的lib目录中

  • 相关阅读:
    继承性03
    继承性
    Arrays与Math类
    Static关键字
    random模块,time模块,os模块,sys模块
    re模块
    冒泡排序、递归、二分查找
    内置函数
    生成器和生成器表达式
    迭代器
  • 原文地址:https://www.cnblogs.com/shiwaitaoyuan/p/11929945.html
Copyright © 2011-2022 走看看