cdh版本的sqoop安裝以及配置


sqoop安裝需要提前安裝好sqoop依賴:hadoop 、hive、hbase、zookeeper

hadoop安裝步驟請訪問:http://www.cnblogs.com/xningge/articles/8433297.html

hive安裝步驟請訪問:http://www.cnblogs.com/xningge/p/8433792.html

hbase安裝步驟請訪問:

zookeeper安裝步驟請訪問:http://www.cnblogs.com/xningge/p/8433618.html

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 ???

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM