sqoop的安装

前提条件:
hadoop四节点集群已安装
安装版本:
sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz

[root@master ~]tar xzvf sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz -C /usr/local/
[root@master bin]# tail -3 /etc/profile
PATH=$PATH:/usr/local/hadoop/bin:/usr/local/hadoop/sbin/:/usr/local/sqoop/bin
JAVA_HOME=/usr/java/default/
HADOOP_HOME=/usr/local/hadoop/
$ cd $SQOOP_HOME/conf
$ mv sqoop-env-template.sh sqoop-env.sh

打开sqoop-env.sh并编辑下面几行:

export HADOOP_COMMON_HOME=/usr/local/hadoop 
export HADOOP_MAPRED_HOME=/usr/local/hadoop

可以从下面的下载使用mysql-connector-java的5.1.30.tar.gz文件:下载链接

$ tar -zxf mysql-connector-java-5.1.30.tar.gz
# cd mysql-connector-java-5.1.30
# mv mysql-connector-java-5.1.30-bin.jar /usr/lib/sqoop/lib
[root@master bin]# ls /usr/local/sqoop/lib/ | grep mysql
mysql-connector-java-5.1.44-bin.jar

验证安装结果

[root@master bin]# sqoop-version
Warning: /usr/local/sqoop/bin/../../hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /usr/local/sqoop/bin/../../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /usr/local/sqoop/bin/../../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Warning: /usr/local/sqoop/bin/../../zookeeper does not exist! Accumulo imports will fail.
Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.
17/10/18 07:22:25 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6
Sqoop 1.4.6
git commit id c0c5a81723759fa575844a0a1eae8f510fa32c25
Compiled by root on Mon Apr 27 14:38:36 CST 2015

你可能感兴趣的:(sqoop的安装)