环境:centos7 已安装java和hadoop
1.下载
wget http://archive.cloudera.com/cdh5/cdh/5/sqoop2-1.99.5-cdh5.16.0.tar.gz
2.解压 tar -zxvf sqoop2-1.99.5-cdh5.16.0.tar.gz
3. 修改 /etc/profile
增加环境变量
export SQOOP_HOME=/home/linbin/software/sqoop2-1.99.5-cdh5.16.0
export SQOOP_SERVER_EXTRA_LIB=$SQOOP_HOME/extra
export CATALINA_BASE=$SQOOP_HOME/server
export LOGDIR=$SQOOP_HOME/logs/
export PATH=$PATH:$SQOOP_HOME/bin
环境变量生效
source /etc/profile
4. 修改配置文件
/home/linbin/software/sqoop2-1.99.5-cdh5.16.0/server/conf/sqoop.propertions
org.apache.sqoop.submission.engine.mapreduce.configuration.directory=
/home/linbin/software/hadoop-2.6.0-cdh5.16.0/etc/hadoop
把所有 @BASEDIR@ 替换成 /home/linbin/software/sqoop2-1.99.5-cdh5.16.0/
把所有@LOGDIR@替换成 /home/linbin/software/sqoop2-1.99.5-cdh5.16.0/logs
5. 修改配置文件
/home/linbin/software