本节主要内容:
Sqoop下载
tar -zxf sqoop-1.99.7-bin-hadoop200.tar.gz
sudo mkdir -p /opt/sqoop
sudo mv sqoop
设置Sqoop环境变量
mkdir sqoop-1.99.7-bin-hadoop200/extra-lib
添加jdbc驱动包
wget http://central.maven.org/maven2/org/postgresql/postgresql/42.2.2/postgresql-42.2.2.jar
mv postgresql-42.2.2.jar /opt/sqoop2/sqoop-1.99.7-bin-hadoop200/extra-lib
设置Sqoop所需环境变量
sudo vim /etc/profile.d/sqoop-2.0.sh
#!/bin/sh
# Author:wangxiaolei 王小雷
# Blog: http://blog.csdn.net/dream_an
# Github: https://github.com/lycheeman
# Path: /etc/profile.d/
# Date:20180615
export SQOOP_HOME=/opt/sqoop2/sqoop-1.99.7-bin-hadoop200
export PATH=$SQOOP_HOME/bin:$PATH
export SQOOP_SERVER_EXTRA_LIB=$SQOOP_HOME/extra-lib
设置Hadoop环境变量
sudo vim /etc/profile.d/hadoop-3.1.0.sh
#!/bin/sh
# Author:wangxiaolei 王小雷
# Blog: http://blog.csdn.net/dream_an
# Github: https://github.com/lycheeman
# Path: /etc/profile.d/
# Date:20180615
export HADOOP_HOME="/opt/hadoop/hadoop-3.1.0"
export PATH="$HADOOP_HOME/bin:$PATH"
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
export YARN_CONF_DIR=$HADOOP_HOME/etc/hadoop
内容来源于网络,如有侵权,请联系作者删除!