Time for action – downloading and configuring Sqoop
Let's download and get Sqoop installed and configured.
Go to the Sqoop homepage, select the link for the most stable version that is no earlier than 1.4.1, and match it with the version of Hadoop you are using. Download the file.
Copy the retrieved file where you want it installed on your system; then uncompress it:
$mv sqoop-1.4.1-incubating__hadoop-1.0.0.tar.gz_ /usr/local $ cd /usr/local $ tar –xzf sqoop-1.4.1-incubating__hadoop-1.0.0.tar.gz_
Make a symlink:
$ ln -s sqoop-1.4.1-incubating__hadoop-1.0.0 sqoop
Update your environment:
$ export SQOOP_HOME=/usr/local/sqoop $ export PATH=${SQOOP_HOME}/bin:${PATH}
Download the JDBC driver for your database; for MySQL, we find it at http://dev.mysql.com/downloads/connector/j/5.0.html.
Copy the downloaded JAR file into the Sqoop
lib
directory:$ cp mysql-connector-java-5.0.8-bin.jar /opt/sqoop/lib
Test Sqoop:
$ sqoop help
You will see the following output:
usage: sqoop COMMAND [ARGS] Available...