Sqoop安装

1.解压sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz到/usr/project:

[root@master ~]# tar -zxvf sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz -C /usr/project/

2.将sqoop-1.4.7.bin__hadoop-2.6.0重命名为sqoop:
[root@master ~]# cd /usr/project/
[root@master project]# mv sqoop-1.4.7.bin__hadoop-2.6.0/ sqoop
3.打开/etc/profile文件,配置sqoop环境变量:

[root@master project]# vi /etc/profile

添加:

export SQOOP_HOME=/usr/project/sqoop

export PATH=$PATH:$SQOOP_HOME/bin

[root@master project]# . /etc/profile

4将mysql-connector-java-5.1.49下的mysql-connector-java-5.1.49.jar复制到/usr/project/sqoop/lib/:

[root@master project]# cd ~
[root@master ~]# cd mysql-connector-java-5.1.49/
[root@master mysql-connector-java-5.1.49]# cp mysql-connector-java-5.1.49.jar /usr/project/sqoop/lib/
5修改sqoop的配置文件:

5.1切换到/usr/project/sqoop/conf目录下将qoop-env-template.sh重命名为sqoop-env.sh

[root@master mysql-connector-java-5.1.49]# cd /usr/project/sqoop/conf/
[root@master conf]# mv sqoop-env-template.sh sqoop-env.sh
5.2修改sqoop-env.sh文件:

找到如下几行内容:

Sqoop安装

替换成如下内容:

Sqoop安装 

6.查看sqoop当前版本信息:

sqoop -version

出现Sqoop 1.4.7表明安装成功

但有警告信息,需要修改/usr/project/sqoop/bin下的configure-sqoop文件:

找到下面这几行

Sqoop安装然后注释掉 Sqoop安装

然后再查看,这时警告信息已去除

Sqoop安装

上一篇:Sqoop的mysqltohive报错


下一篇:SQOOP安装及使用