一:下载安装包
https://archive.apache.org/dist/sqoop/
二:解压修改配置。
tar -zxvf sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz -C /opt
cd /opt
mv sqoop-1.4.7.bin__hadoop-2.6.0/ sqoop-1.4.7
修改环境变量
vi /etc/profile
#SQOOP_HOME
export SQOOP_HOME=/opt/sqoop-1.4.7
export PATH=$PATH:$SQOOP_HOME/bin
source /etc/profile
修改配置
cd /opt/apache-hive-3.1.2-bin/conf
cp sqoop-env-template.sh sqoop-env.sh
vi sqoop-env.sh
export HADOOP_COMMON_HOME=/opt/hadoop-3.2.4/#Set path to where hadoop-*-core.jar is available
export HADOOP_MAPRED_HOME=/opt/hadoop-3.2.4/#set the path to where bin/hbase is available
#export HBASE_HOME=#Set the path to where bin/hive is available
export HIVE_HOME=/opt/apache-hive-3.1.2-bin
三:增加jar包
- 增加mysql驱动
将5.7包的驱动,放在lib目录下
- 下载commons-lang-2.6.jar包,放在lib下,删除3以上jar包。
https://repo.maven.apache.org/maven2/commons-lang/commons-lang/2.6/
3. cp hive-common-3.1.2.jar的包放在lib目录
cp /opt/apache-hive-3.1.2-bin/lib/hive-common-3.1.2.jar /opt/sqoop-1.4.7/lib/
四:检验。
sqoop version