1.下载

wget http://mirror.bit.edu.cn/apache/sqoop/1.99.7/sqoop-1.99.7-bin-hadoop200.tar.gz

2.解压

tar -zxvf sqoop-1.99.7-bin-hadoop200.tar.gz -C /root/sqoop/

3.配置环境变量

export SQOOP_HOME=/root/sqoop/sqoop-1.99.7-bin-hadoop200
 export CATALINA_BASE=$SQOOP_HOME/server
 export LOGDIR=$SQOOP_HOME/logs/

export PATH=$SQOOP_HOME/bin:$PATH

source ~/.base_profile

source /etc/profile

4.进入$SQOOP_HOME/conf目录,修改sqoop.properties,修改为hadoop的conf目录地址
org.apache.sqoop.submission.engine.mapreduce.configuration.directory=/root/hadoop/hadoop-2.7.4/etc/hadoop/

$SQOOP_HOME/conf添加catalina.properties文件,加入本机hadoop的相关jar路径,配置如下:注意修改hadoop路径

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/../lib/*.jar,/root/hadoop/hadoop-2.7.4/share/hadoo
p/common/*.jar,/root/hadoop/hadoop2.7.4/share/hadoop/common/lib/*.jar,/root/hadoop/hadoop2.7.4/share/hadoop/hdfs/*.jar,/root/hadoop/hadoop2.7.4/share/hadoop/hdfs/lib/*.jar,/root/hadoop/hadoop-2.7.4/share/hadoop/mapreduce/*.jar,/root/hadoop/hadoop-2.7.4/share/hadoop/mapreduce/lib/*.jar,/root/hadoop/hadoop-2.7.4/share/hadoop/tools/lib/*.jar,/root/hado
op/hadoop-2.7.4/share/hadoop/yarn/*.jar,/root/hadoop/hadoop-2.7.4/share/hadoop/yarn/lib/*.jar,/root/hadoop/hadoop-2.7.4/share/hadoop/httpfs/tomcat/lib/*.jar

cp mysql-connector-java-5.1.39.jar /root/sqoop/sqoop-1.99.7-bin-hadoop200/server/lib/

5.启动sqoop

[root@host sqoop-1.99.7-bin-hadoop200]# bin/sqoop.sh server start
Setting conf dir: bin/../conf
Sqoop home directory: /root/sqoop/sqoop-1.99.7-bin-hadoop200
Starting the Sqoop2 server...
0    [main] INFO  org.apache.sqoop.core.SqoopServer  - Initializing Sqoop server.
18   [main] INFO  org.apache.sqoop.core.PropertiesConfigurationProvider  - Starting config file poller thread
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/hadoop/hadoop-2.7.4/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/hive/apache-hive-2.1.1/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Sqoop2 server started.

启动sqoop客户端

[root@host sqoop-1.99.7-bin-hadoop200]# bin/sqoop.sh client

Setting conf dir: bin/../conf

Sqoop home directory: /root/sqoop/sqoop-1.99.7-bin-hadoop200

Sqoop Shell: Type 'help' or '\h' for help.

sqoop:000>

sqoop:000> show connector
+------------------------+---------+------------------------------------------------------------+----------------------+
|          Name          | Version |                           Class                            | Supported Directions |
+------------------------+---------+------------------------------------------------------------+----------------------+
| generic-jdbc-connector | 1.99.7  | org.apache.sqoop.connector.jdbc.GenericJdbcConnector       | FROM/TO              |
| kite-connector         | 1.99.7  | org.apache.sqoop.connector.kite.KiteConnector              | FROM/TO              |
| oracle-jdbc-connector  | 1.99.7  | org.apache.sqoop.connector.jdbc.oracle.OracleJdbcConnector | FROM/TO              |
| ftp-connector          | 1.99.7  | org.apache.sqoop.connector.ftp.FtpConnector                | TO                   |
| hdfs-connector         | 1.99.7  | org.apache.sqoop.connector.hdfs.HdfsConnector              | FROM/TO              |
| kafka-connector        | 1.99.7  | org.apache.sqoop.connector.kafka.KafkaConnector            | TO                   |
| sftp-connector         | 1.99.7  | org.apache.sqoop.connector.sftp.SftpConnector              | TO                   |
+------------------------+---------+------------------------------------------------------------+----------------------+

创建链接

sqoop:000>  create link -c  generic-jdbc-connector

Creating link for connector with name generic-jdbc-connector Please fill following values to create new link object Name: mysql2

Database connection

Driver class: com.mysql.jdbc.Driver

Connection String: jdbc:mysql://127.0.0.1:3306/test

Username: root

Password: Fetch Size: **

Connection Properties: There are currently 0 values in the map: entry#

SQL Dialect

Identifier enclose:   此处为空格

New link was successfully created with validation status WARNING and name mysql2

sqoop:000> show link
+-----------+------------------------+---------+
|   Name    |     Connector Name     | Enabled |
+-----------+------------------------+---------+
| mysqllink | generic-jdbc-connector | true    |
| mysql2    | generic-jdbc-connector | true    |
+-----------+------------------------+---------+

sqoop2的安装配置的更多相关文章

  1. Hive安装配置指北(含Hive Metastore详解)

    个人主页: http://www.linbingdong.com 本文介绍Hive安装配置的整个过程,包括MySQL.Hive及Metastore的安装配置,并分析了Metastore三种配置方式的区 ...

  2. Hive on Spark安装配置详解(都是坑啊)

    个人主页:http://www.linbingdong.com 简书地址:http://www.jianshu.com/p/a7f75b868568 简介 本文主要记录如何安装配置Hive on Sp ...

  3. ADFS3.0与SharePoint2013安装配置(原创)

    现在越来越多的企业使用ADFS作为单点登录,我希望今天的内容能帮助大家了解如何配置ADFS和SharePoint 2013.安装配置SharePoint2013这块就不做具体描述了,今天主要讲一下怎么 ...

  4. Hadoop的学习--安装配置与使用

    安装配置 系统:Ubuntu14.04 java:1.7.0_75 相关资料 官网 下载地址 官网文档 安装 我们需要关闭掉防火墙,命令如下: sudo ufw disable 下载2.6.5的版本, ...

  5. redis的安装配置

    主要讲下redis的安装配置,以及以服务的方式启动redis 1.下载最新版本的redis-3.0.7  到http://redis.io/download中下载最新版的redis-3.0.7 下载后 ...

  6. Windows环境下的NodeJS+NPM+Bower安装配置

    npm作为一个NodeJS的模块管理,之前我由于没有系统地看资料所以导致安装配置模块的时候走了一大段弯路,所以现在很有必要列出来记录下.我们要先配置npm的全局模块的存放路径以及cache的路径,例如 ...

  7. ubuntu kylin 14.04安装配置MongoDB v2.6.1(转)

    1.获取最新版本 https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.1.tgz 2.解压并进入bin目录 tar zxvf mongo ...

  8. Django基础之安装配置

    安装配置 一 MVC和MTV模式 著名的MVC模式:所谓MVC就是把web应用分为模型(M),控制器(C),视图(V)三层:他们之间以一种插件似的,松耦合的方式连接在一起. 模型负责业务对象与数据库的 ...

  9. 【转】Windows平台下的Subversion安装配置新手指南

    原文地址:http://developer.51cto.com/art/201005/199628.htm 本文介绍Subversion安装配置快速指南,首先讲Subversion的安装和配置,Uni ...

随机推荐

  1. jq 分页

    转自:https://www.cnblogs.com/wolflower/p/6898479.html参考:https://github.com/tianxiangbing/paging先引入这两个插 ...

  2. LeetCode Single Number I II Python

    Single Number Given an array of integers, every element appears twice except for one. Find that sing ...

  3. 如何调优JVM

    堆设置 -Xmx3550m:设置JVM最大堆内存 为3550M. -Xms3550m:设置JVM初始堆内存 为3550M.此值可以设置与-Xmx相同,以避免每次垃圾回收完成后JVM重新分配内存. -X ...

  4. apache spark kubernets 部署试用

    spark 是一个不错的平台,支持rdd 分析stream 机器学习... 以下为使用kubernetes 部署的说明,以及注意的地方 具体的容器镜像使用别人已经构建好的 deploy yaml 文件 ...

  5. sql server 循环操作

    使用的sql 语句如下: declare @userid int ;set @userid=0while(@userid<20)begin print 'the result is :'+STR ...

  6. Oracle 10g RAC OCR 和 VotingDisk 的备份与恢复

    Oracle RAC 中OCR 和Voting Disk 备份在我的blog: Oracle RAC 常用维护工具和命令 中已经有说明,现在再次把它单独拿出做一个说明, 因为OCR 和Voting D ...

  7. bzoj 4566 [Haoi2016]找相同字符——广义后缀自动机

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4566 每个后缀结尾处 ct[ ] = 1 ,按拓扑序 dp 一下就能求出 right 集合的 ...

  8. JSP中的MVC

    如下图

  9. webpack入门认知

    webpack 是什么? 本质上,webpack 是一个现代 JavaScript 应用程序的静态模块打包器(module bundler).当 webpack 处理应用程序时,它会递归地构建一个依赖 ...

  10. js去除运营商或者路由器添加的广告脚本

    是不是偶尔发现在家里看网页的时候回插入一个广告,很烦人.开发的网站,上传到了阿里云 oss,设置了域名解析,但是在家里晚上访问的时候,总会在页面添加一个广告,导致页面卡主,一开始以为是路由器的问题,以 ...