sqoop安装需要提前安装好sqoop依赖:hadoop 、hive、hbase、zookeeper

hadoop安装步骤请访问:https://blog.csdn.net/qq_35036995/article/details/80275320

hive安装步骤请访问:https://blog.csdn.net/qq_35036995/article/details/80249944

hbase安装步骤请访问:

zookeeper安装步骤请访问:https://blog.csdn.net/qq_35036995/article/details/80275210

sqoop需要的软件包:sqoop-1.4.5-cdh5.3.6.tar.gz


1、上传sqoop软件包到Linux系统指定目录:/opt/softwares/cdh

2、解压 sqoop软件包到指定目录:/opt/modules/cdh/

  tar -zxvf sqoop-1.4.5-cdh5.3.6.tar.gz -C /opt/modules/cdh/

3 、配置conf/sqoop-env.sh

  复制:$ cp -a sqoop-env-template.sh sqoop-env.sh或直接重命名

  

#Set path to where bin/hadoop is available
export HADOOP_COMMON_HOME=/opt/modules/cdh/hadoop-2.5.0-cdh5.3.6

#Set path to where hadoop-*-core.jar is available
export HADOOP_MAPRED_HOME=/opt/modules/cdh/hadoop-2.5.0-cdh5.3.6

#set the path to where bin/hbase is available
export HBASE_HOME=/opt/modules/cdh/hbase-0.98.6-cdh5.3.6

#Set the path to where bin/hive is available
export HIVE_HOME=/opt/modules/cdh/hive-0.13.1-cdh5.3.6

#Set the path for where zookeper config dir is
export ZOOCFGDIR=/opt/modules/cdh/zookeeper-3.4.5-cdh5.3.6

4、拷贝jdbc驱动包达到lib目录

  $ cp /opt/modules/apache-hive-0.13.1-bin/lib/mysql-connector-java-5.1.27-bin.jar  /opt/modules/cdh/sqoop-1.4.5-cdh5.3.6/lib/

5、测试

  查看帮助信息:bin/sqoop help
  测试:sqoop 连接 mysql
  bin/sqoop list-databases --help
  bin/sqoop list-databases --connect jdbc:mysql://hadoop01.xningge.com:3306/ --username root --password ???

 

 

 

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐