Prerequisites
You must have at least core Hadoop on your system. See Configure the Remote Repository for more information.
Verify the HDP repositories are available:
yum list sqoop
The output should list at least one Sqoop package similar to the following:
sqoop.noarch <version>
If yum responds with "Error: No matching package to list" as shown below, yum cannot locate a matching RPM. This can happen if the repository hosting the HDP RPMs is unavailable, or has been disabled. Follow the instructions at Configure the Remote Repository to configure either a public or private repository before proceeding.
Error: No matching package to list.
Installation
Install Sqoop RPMs.
On all nodes where you plan to use the Sqoop client, install the RPMs:
For RHEL/CentOS:
yum install sqoop
For SLES:
zypper install sqoop
Optional: Download and add database connector.
If you plan to migrate data from HDFS/Hive/HBase to database, you must have appropriate database connector (MySQL/Oracle/PostgreSQL) JAR file.
For MySQL:
Execute the following command on the Sqoop host machine:
For RHEL/CentOS:
yum install mysql-connector-java
For SLES:
zypper install mysql-connector-java
Copy the JAR file to
.$SQOOP_HOME
/lib$SQOOP_HOME
is by default set to/usr/lib/sqoop/
.Ensure that the JAR file has appropriate permissions.
For Oracle: Note that the following instructions are for OJDBC driver for Oracle 11g.
Download the Oracle JDBC (OJDBC) driver from here.
Copy the JAR file to
.$SQOOP_HOME
/lib$SQOOP_HOME
is by default set to/usr/lib/sqoop/
.Ensure that the JAR file has appropriate permissions.
For PostgreSQL:
Execute the following command on the Sqoop host machine:
For RHEL/CentOS:
yum install postgresql-jdbc
For SLES:
zypper install postgresql-jdbc
Copy the downloaded JAR file to
directory.$SQOOP_HOME
/lib$SQOOP_HOME
is by default set to/usr/lib/sqoop/
.Ensure that the JAR file has appropriate permissions.