Sqoop2安装配置

x33g5p2x  于2020-09-08 发布在 Sqoop  
字(0.8k)|赞(0)|评价(0)|浏览(1688)

1 Sqoop环境变量设置

sudo vim /etc/profile.d/sqoop-2.sh
#!/bin/sh
# Author:wangxiaolei(王小雷)
# Blog: http://blog.csdn.net/dream_an
# Github: https://github.com/lycheeman
# Date:201807

export SQOOP_HOME=/opt/sqoop2/sqoop-1.99.7-bin-hadoop200
export PATH=$SQOOP_HOME/bin:$PATH
export SQOOP_SERVER_EXTRA_LIB=/var/lib/sqoop2/

2 Sqoop2配置文件修改

修改conf/sqoop.properties

org.apache.sqoop.submission.engine.mapreduce.configuration.directory=/opt/hadoop/hadoop-3.1.0/etc/hadoop/conf/

3 Sqoop2数据库初始化与验证

Sqoop2数据库初始化

sudo mkdir /var/lib/sqoop2
sudo chown busuanzi:busuanzi /var/lib/sqoop2/
mkdir /var/lib/sqoop2/data
mkdir /var/lib/sqoop2/extra-lib
sqoop2-tool upgrade

验证

sqoop2-tool verify

sqoop2-server start

4 开启Sqoop2

sqoop2-server start

查看

jps

5 添加数据库驱动

将数据库驱动放置

cp postgresql-42.2.2.jar /var/lib/sqoop2/extra-lib/

6 Sqoop2客户端

开启Sqoop2客户端

sqoop2-shell

查看帮助

help

关闭客户端

:x

7 关闭Sqoop2

sqoop2-server stop

相关文章