Sqoop安装

文章详细描述了Sqoop的安装过程,包括解压软件包,重命名目录,配置环境变量,修改配置文件以指定Hadoop路径,将MySQL驱动添加到lib目录,并测试了连接MySQL数据库。在测试过程中,虽然出现了一些警告,但最终能够列出数据库名称,表明Sqoop安装成功。
摘要由CSDN通过智能技术生成

Sqoop安装

  • 解压

    • tar -zxf /usr/local/install_pack/sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz -C /opt/
      
  • 改名

    • mv sqoop-1.4.7.bin__hadoop-2.6.0 sqoop
      
  • 配置环境变量

    • vi /root/.bash_profile 
          export SQOOP_HOME=/opt/sqoop
          export PATH=$PATH:$SQOOP_HOME/bin
      
  • 更改配置文件

    • cd conf/
      mv sqoop-env-template.sh sqoop-env.sh
      vi sqoop-env.sh
      	export HADOOP_COMMON_HOME=/opt/hadoop-3.2.1
      	export HADOOP_MAPRED_HOME=/opt/hadoop-3.2.1
      
  • 将mysql驱动添加到lib文件夹中

    • cp /usr/local/install_pack/mysql-connector-java-8.0.16.jar /opt/sqoop/lib/
      
  • 测试连接mysql

    • cd bin/
      [root@master bin]# sqoop list-databases --connect jdbc:mysql://localhost --username root --password 123456
      Warning: /usr/lib/hbase does not exist! HBase imports will fail.
      Please set $HBASE_HOME to the root of your HBase installation.
      22/09/26 16:54:23 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
      22/09/26 16:54:23 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
      Mon Sep 26 16:54:23 CST 2022 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
      information_schema
      mysql
      performance_schema
      sys
      
  • 验证sqoop

    • [root@master install_pack]# sqoop version
      Warning: /opt/sqoop/../hbase does not exist! HBase imports will fail.
      Please set $HBASE_HOME to the root of your HBase installation.
      Warning: /opt/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
      Please set $HCAT_HOME to the root of your HCatalog installation.
      Warning: /opt/sqoop/../accumulo does not exist! Accumulo imports will fail.
      Please set $ACCUMULO_HOME to the root of your Accumulo installation.
      2022-09-25 10:53:52,756 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
      Sqoop 1.4.7
      git commit id 2328971411f57f0cb683dfb79d19d4d19d185dd8
      Compiled by maugli on Thu Dec 21 15:59:58 STD 2017
      

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

墨染~残阳

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值