Hadoop组件sqoop部署

1.安装sqoop

#解压并改名
[root@master app]# tar -zxvf sqoop-1.4.6-cdh5.5.2.tar -C /app/
[root@master app]# mv sqoop-1.4.6-cdh5.5.2/ sqoop

#配置环境变量
#注意自己的目录
[root@master sqoop]# vim /etc/profile
export SQOOP_HOME=/app/sqooq
export PATH=$PATH:$SQOOP_HOME/bin 
export CLASSPATH=$CLASSPATH:$SQOOP_HOME/lib

#将mysql的jar包放入sqoop的lib目录中
[root@master home]# cp mysql-connector-java-5.1.39.jar /app/sqoop/lib

#编辑配置文件
#文件内容
#Set path to where bin/hadoop is available
export HADOOP_COMMON_HOME=/app/hadoop      #Hadoop安装目录

#Set path to where hadoop-*-core.jar is available
export HADOOP_MAPRED_HOME=/app/hadoop   #Hadoop安装目录

#set the path to where bin/hbase is available
export HBASE_HOME=/app/hbase        #hbase安装目录

#Set the path to where bin/hive is available
export HIVE_HOME=/app/hive       #hive安装目录

#Set the path for where zookeper config dir is
#export ZOOCFGDIR=            #可不配置

2.验证是否成功

[root@master conf]# sqoop version
Warning: /app/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /app/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
21/03/12 20:29:11 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.5.2
Sqoop 1.4.6-cdh5.5.2
git commit id 8e266e052e423af592871e2dfe09d54c03f6a0e8
Compiled by jenkins on Mon Jan 25 16:10:15 PST 2016

#连接数据库测试
[root@master conf]# sqoop-list-databases --connect jdbc:mysql://master:3306/ -username root -password 123456

Warning: /app/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /app/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
21/03/12 20:31:03 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.5.2
21/03/12 20:31:03 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
21/03/12 20:31:04 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
Fri Mar 12 20:31:04 CST 2021 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
information_schema
hive
mysql
performance_schema
sys
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值