经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » 数据库/运维 » MySQL » 查看文章
Ubuntu 安装hive + mysql
来源:cnblogs  作者:靠,疯了吧  时间:2018/11/9 23:48:03  对本文有异议

先安装mysql 

  1. sudo apt-get update
  2. sudo apt-get install mysql-server
  3. 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.   
        1. <property>
        2. <name>javax.jdo.option.ConnectionURL</name>
        3. <value>jdbc:mysql://hadoop-senior01.itguigu.com:3306/metastore?createDatabaseIfNotExist=true</value>
        4. <description>JDBC connect string for a JDBC metastore</description>
        5. </property>
        6.  
        7. <property>
        8. <name>javax.jdo.option.ConnectionDriverName</name>
        9. <value>com.mysql.jdbc.Driver</value>
        10. <description>Driver class name for a JDBC metastore</description>
        11. </property>
        12.  
        13. <property>
        14. <name>javax.jdo.option.ConnectionUserName</name>
        15. <value>root</value>
        16. <description>username to use against metastore database</description>
        17. </property>
        18.  
        19. <property>
        20. <name>javax.jdo.option.ConnectionPassword</name>
        21. <value>123456</value>
        22. <description>password to use against metastore database</description>
        23. </property>
        24. <!-- 是否在当前客户端中显示查询出来的数据的字段名称 -->
        25. <property>
        26. <name>hive.cli.print.header</name>
        27. <value>true</value>
        28. <description>Whether to print the names of the columns in query output.</description>
        29. </property>
        30.  
        31. <!-- 是否在当前客户端中显示当前所在数据库名称 -->
        32. <property>
        33. <name>hive.cli.print.current.db</name>
        34. <value>true</value>
        35. <description>Whether to include the current database in the Hive prompt.</description>
        36. </property>

         

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

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

 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号