[Big Data] Install Sqoop on CentOS7

1. Sqoop installation and configuration

1. Install the software

1. Upload software

insert image description here

2. Decompression software

·解压到/opt/module文件夹下:
	tar -zxvf sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz -C /opt/module
·重命名:
	mv sqoop-1.4.7.bin__hadoop-2.6.0 sqoop-1.4.7

insert image description here

3. Modify the configuration file (in the conf directory of sqoop-1.4.7)

mv sqoop-env-template.sh sqoop-env.sh
vim sqoop-env.sh

The modified content is shown in the figure:

4. Configure environment variables

vim ~/.bashrc

Then add the following:

export SQOOP_HOME=/opt/module/sqoop-1.4.7
export PATH=$SQOOP_HOME/bin:$PATH

Finally make it work:

source ~/.bashrc

5. Copy the mysql driver package to /opt/modules/sqoop/lib.

cp ./mysql-connector-java-5.1.31.jar /opt/module/sqoop-1.4.7/lib/

insert image description here

6. Test

sqoop list-databases --connect jdbc:mysql://AY01:3306/ --username root --password MySQL_123

insert image description here

Guess you like

Origin blog.csdn.net/weixin_45954198/article/details/128488251