-
解压
-
tar -zxf /usr/local/install_pack/sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz -C /opt/
-
-
改名
-
mv sqoop-1.4.7.bin__hadoop-2.6.0 sqoop
-
-
配置环境变量
-
vi /root/.bash_profile export SQOOP_HOME=/opt/sqoop export PATH=$PATH:$SQOOP_HOME/bin
-
-
更改配置文件
-
cd conf/ mv sqoop-env-template.sh sqoop-env.sh vi sqoop-env.sh export HADOOP_COMMON_HOME=/opt/hadoop-3.2.1 export HADOOP_MAPRED_HOME=/opt/hadoop-3.2.1
-
-
将mysql驱动添加到lib文件夹中
-
cp /usr/local/install_pack/mysql-connector-java-8.0.16.jar /opt/sqoop/lib/
-
-
测试连接mysql
-
cd bin/ [root@master bin]# sqoop list-databases --connect jdbc:mysql://localhost --username root --password 123456 Warning: /usr/lib/hbase does not exist! HBase imports will fail. Please set $HBASE_HOME to the root of your HBase installation. 22/09/26 16:54:23 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead. 22/09/26 16:54:23 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset. Mon Sep 26 16:54:23 CST 2022 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 mysql performance_schema sys
-
-
验证sqoop
-
[root@master install_pack]# sqoop version Warning: /opt/sqoop/../hbase does not exist! HBase imports will fail. Please set $HBASE_HOME to the root of your HBase installation. Warning: /opt/sqoop/../hcatalog does not exist! HCatalog jobs will fail. Please set $HCAT_HOME to the root of your HCatalog installation. Warning: /opt/sqoop/../accumulo does not exist! Accumulo imports will fail. Please set $ACCUMULO_HOME to the root of your Accumulo installation. 2022-09-25 10:53:52,756 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7 Sqoop 1.4.7 git commit id 2328971411f57f0cb683dfb79d19d4d19d185dd8 Compiled by maugli on Thu Dec 21 15:59:58 STD 2017
-
Sqoop安装
于 2023-06-12 17:22:16 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)