Sqoop是一款开源的工具,主要用于在Hadoop与传统的关系数据库之间进行数据的传递。

1.下载

hadoop@dblab:/usr/local$ sudo wget http://mirror.bit.edu.cn/apache/sqoop/1.4.7/sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz

hadoop@dblab:/usr/local$ sudo tar -zxvf sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz  

hadoop@dblab:/usr/local$ sudo mv sqoop-1.4.7.bin__hadoop-2.6.0 sqoop

hadoop@dblab:/usr/local$ sudo chown -R hadoop:hadoop sqoop

2.修改配置文件

hadoop@dblab:/usr/local/sqoop/conf$ cat sqoop-env-template.sh >> sqoop-env.sh
hadoop@dblab:/usr/local/sqoop/conf$ vim sqoop-env.sh

hadoop@dblab:/usr/local/sqoop/conf$ vim sqoop-env.sh 

export HADOOP_COMMON_HOME=/usr/local/hadoop

export HADOOP_MAPRED_HOME=/usr/local/hadoop

export HBASE_HOME=/usr/local/hbase

export HIVE_HOME=/usr/local/hive

3.配置环境变量

hadoop@dblab:/usr/local/sqoop/conf$ vim ~/.bashrc 

export SQOOP_HOME=/usr/local/sqoop

export PATH=$PATH:$SBT_HOME/bin:$$QOOP_HOME/bin

export CLASSPATH=$CLASSPATH:$SQOOP_HOME/lib

hadoop@dblab:/usr/local/sqoop/conf$ source ~/.bashrc
上述还存在问题。