sqoop2安装配置

一、下载编译好的压缩包

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


二、解压缩到/usr/local下

tar -zxf sqoop-1.99.6-bin-hadoop200.tar.gz -C /usr/local


三、修改配置文件

vi /usr/local/sqoop-1.99.6-bin-hadoop200/server/conf/catalina.properties


修改common.loader中的hadoop的jar包路径为自己机器jar包的路径,我的路径修改后

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/../lib/*.jar,/usr/local/hadoop-2.7.1/share/hadoop/common/*.jar,/usr/local/hadoop-2.7.1/share/hadoop/common/lib/*.jar,/usr/local/hadoop-2.7.1/share/hadoop/hdfs/*.jar,/usr/local/hadoop-2.7.1/share/hadoop/hdfs/lib/*.jar,/usr/local/hadoop-2.7.1/share/hadoop/mapreduce/*.jar,/usr/local/hadoop-2.7.1/share/hadoop/mapreduce/lib/*.jar,/usr/local/hadoop-2.7.1/share/hadoop/yarn/*.jar,/usr/local/hadoop-2.7.1/share/hadoop/yarn/lib/*.jar,/usr/lib/hive/lib/*.jar

另外如果安装了hive 修改hive的路径


四、配置环境变量

vi /etc/profile添加

PATH=$PATH:/usr/local/sqoop-1.99.6-bin-hadoop200/bin/


使生效

source /etc/profile


五、修改server配置文件

vi /usr/local/sqoop-1.99.6-bin-hadoop200/server/conf/sqoop.properties

修改下面的选择为mapreduce的配置文件路径(根据自己机器的路径配置)

org.apache.sqoop.submission.engine.mapreduce.configuration.directory=/usr/local/hadoop-2.7.1/etc/hadoop


六、复制相关jdbc驱动jar包到/usr/local/sqoop-1.99.6-bin-hadoop200/server/lib目录下

没有lib目录自己可以创建,我要导mysql的数据,所以把mysql的jdbc包考到了lib目录下


七、启动server

sqoop2-server start

八、验证配置是否正确

必须先启动sqoop,

再执行

sqoop2-tool verify

如果没有报错,出现

Verification was successful.

Tool class org.apache.sqoop.tools.tool.VerifyTool has finished correctly

代表配置成功



停止 sqoop2-server stop


九、启动client

sqoop2-shell










本文转自 yntmdr 51CTO博客,原文链接:http://blog.51cto.com/yntmdr/1713042,如需转载请自行联系原作者
上一篇:Sqoop数据分析引擎安装与使用


下一篇:Hive 1.2.1&Spark&Sqoop安装指南