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/
修改conf/sqoop.properties
org.apache.sqoop.submission.engine.mapreduce.configuration.directory=/opt/hadoop/hadoop-3.1.0/etc/hadoop/conf/
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
sqoop2-server start
查看
jps
将数据库驱动放置
cp postgresql-42.2.2.jar /var/lib/sqoop2/extra-lib/
开启Sqoop2客户端
sqoop2-shell
查看帮助
help
关闭客户端
:x
sqoop2-server stop
内容来源于网络,如有侵权,请联系作者删除!