Ubuntu 安装hive + mysql

Posted 靠,疯了吧

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu 安装hive + mysql相关的知识,希望对你有一定的参考价值。

先安装mysql 

sudo apt-get update
sudo apt-get install mysql-server 
sudo mysql_secure_installation
具体详情请另查。
注意:mysql 5.7.24 会有安全检测之类,可能需要降低安全机制:
  详见:https://blog.csdn.net/u014236541/article/details/78244601

 

1. 通过tar -zxvf ....hive.tar.gz  -C /soft  解压安装hive

  1.   进入conf/目录:
    1. cp hive-default.xml.template hive-default.xml
      1.   
            <property>
                <name>javax.jdo.option.ConnectionURL</name>
                <value>jdbc:mysql://hadoop-senior01.itguigu.com:3306/metastore?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>123456</value>
                <description>password to use against metastore database</description>
            </property>
            <!-- 是否在当前客户端中显示查询出来的数据的字段名称 -->
            <property>
                <name>hive.cli.print.header</name>
                <value>true</value>
                <description>Whether to print the names of the columns in query output.</description>
            </property>
        
            <!-- 是否在当前客户端中显示当前所在数据库名称 -->
            <property>
                <name>hive.cli.print.current.db</name>
                <value>true</value>
                <description>Whether to include the current database in the Hive prompt.</description>
            </property>

         

    2. cp hive-env.sh.template hive-env.sh
      1.   
        # Set HADOOP_HOME to point to a specific hadoop install directory
        HADOOP_HOME=/soft/hadoop-2.5.0-cdh5.3.6
        
        # Hive Configuration Directory can be controlled by:
        export HIVE_CONF_DIR=/soft/hive-0.13.1-cdh5.3.6/conf
        
        # Folder containing extra ibraries required for hive compilation/execution can be controlled by:
        # export HIVE_AUX_JARS_PATH=
        [email protected]:/soft/hive-0.13.1-cdh5.3.

        3. cp hive-exec-log4j.properties.template hive-exec-log4j.properties  显示日志





以上是关于Ubuntu 安装hive + mysql的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu 安装hive + mysql

Ubuntu16.04下Hive的安装与配置

HIVE 2.3.4 本地安装与部署 (Ubuntu)

Ubuntu系统下安装并配置hive-2.1.0

Ubuntu20.04安装MySQL及配置MySQL workbench

Ubuntu20.04安装MySQL及配置MySQL workbench