欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

云计算中sqoop安装教程

程序员文章站 2022-07-05 22:54:10
安装sqoop的前提是已经具备java和hadoop的环境。 - 1. 下载并解压, 重命名 tar -zxvf sqoop-1.4.6.bin__hadoop-2.0.4-alph...

安装sqoop的前提是已经具备java和hadoop的环境。
- 1. 下载并解压, 重命名

tar -zxvf  sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz
mv sqoop-1.4.6.bin__hadoop-2.0.4-alpha sqoop
修改配置文件
$ cd $SQOOP_HOME/conf
$ cp sqoop-env-template.sh sqoop-env.sh
打开sqoop-env.sh并编辑下面几行:
export HADOOP_COMMON_HOME=$HADOOP_HOME
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HIVE_HOME=$HIVE_HOME
加入mysql的jdbc驱动包
cp $HIVE_HOME/lib/mysql-connector-java-5.1.35.jar $SQOOP_HOME/lib
验证启动
[root@master bin]# ./sqoop-version 
Warning: /usr/myapp/hadoops/sqoop/bin/../../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /usr/myapp/hadoops/sqoop/bin/../../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
18/04/08 13:55:22 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