1. Download sqoop to/usr/local: wget http://archive.cloudera.com/cdh4/cdh/4/sqoop-1.4.3-cdh4.6.0.tar.gz
2. Decompression: tar-zxvf sqoop-1.4.3-cdh4.6.0.tar.gz
3. Rename: Music sqoop-1.4.3-cdh4.6.0 sqoop
4. Add the environment variable/etc/profile:
Export SQOOP_HOME =/usr/local/sqoop
Export CLASSPATH =.: $ CLASSPATH: $ SQOOP_HOME/lib
Export PATH = $ PATH: $ SQOOP_HOME/bin
5. Verify the installation: sqoop help
6. Exceptions may be thrown:
Exception in thread "main" java. lang. NoClassDefFoundError: org/apache/sqoop/Sqoop
Caused by: java. lang. ClassNotFoundException: org. apache. sqoop. Sqoop
At java.net. URLClassLoader $ 1.run( URLClassLoader. java: 202)
At java. security. AccessController. doPrivileged (Native Method)
At java.net. URLClassLoader. findClass (URLClassLoader. java: 190)
At java. lang. ClassLoader. loadClass (ClassLoader. java: 307)
At sun. misc. Launcher $ AppClassLoader. loadClass (Launcher. java: 301)
At java. lang. ClassLoader. loadClass (ClassLoader. java: 248)
At first glance, I couldn't find the jar package. This problem had plagued me for one day. It was useless to modify all kinds of lib, and the English materials found on the Internet were useless (the version was too new and there was no Chinese material ). [Pitfalls] solution:
Go to $ SQOOP_HOME/bin and modify the sqoop script:
Before modification: exec $ {Hadoop_COMMON_HOME}/bin/hadoop org. apache. sqoop. Sqoop "$ @"
After modification: exec $ {HADOOP_COMMON_HOME}/bin/hadoop jar $ SQOOP_HOME/lib/sqoop-1.4.3-cdh4.5.0.jar org. apache. sqoop. Sqoop "$ @"
It can be seen that, because the hadoop command is used, it is required to install hadoop on the machine where the sqoop-1.4.3-cdh4.5.0 is installed first
Sqoop details: click here
Sqoop: click here
Implement data import between Mysql, Oracle, and HDFS/Hbase through Sqoop
[Hadoop] Detailed description of Sqoop Installation Process
Use Sqoop to export data between MySQL and HDFS Systems
Hadoop Oozie learning notes Oozie does not support Sqoop Problem Solving
Hadoop ecosystem construction (hadoop hive hbase zookeeper oozie Sqoop)
Full history of Hadoop learning-use Sqoop to import MySQL Data to Hive