日期:2014-05-16  浏览次数:20386 次

sqoop 安装以及配置笔记
sqoop 安装以及配置笔记
1.下载 http://archive.cloudera.com/cdh/3/sqoop-1.2.0-CDH3B4.tar.gz

2.下载 http://archive.cloudera.com/cdh/3/hadoop-0.20.2-CDH3B4.tar.gz

3
tar -zxvf sqoop-1.2.0-CDH3B4.tar.gz
tar -zxvf hadoop-0.20.2-CDH3B4.tar.gz

4. 复制3里hadoop-core-0.20.2-CDH3B4.jar到sqoop的lib下

5.在某处复制mysql-connector-java-5.1.1x.jar到sqoop的lib下

6.修改bin/configure-sqoop

注释掉hbase zookeeper检查:
#if [ ! -d "${HBASE_HOME}" ]; then
# echo "Error: $HBASE_HOME does not exist!"
# echo 'Please set $HBASE_HOME to the root of your HBase installation.'
# exit 1
#fi
#if [ ! -d "${ZOOKEEPER_HOME}" ]; then
# echo "Error: $ZOOKEEPER_HOME does not exist!"
# echo 'Please set $ZOOKEEPER_HOME to the root of your ZooKeeper installation.'
# exit 1
#fi

7.运行:
列出mysql所有的表:

./sqoop list-tables --connect jdbc:mysql://ip:port/operation --username root --password 123