Sqoop伪分布式配置

解压和重命名文件
tar -zxvf sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz
mkdir /opt/sqoop
mv sqoop-1.4.7.bin__hadoop-2.6.0  /opt/sqoop/sqoop1.4.7
进入sqoop的配置目录
cd /opt/sqoop/sqoop1.4.7/conf/

#将sqoop-env-template.sh复制一份并命名为sqoop-env.sh
cat sqoop-env-template.sh  >> sqoop-env.sh
#编辑sqoop-env.sh 加入安装了组件的对应路径
vim sqoop-env.sh
#Set path to where bin/hadoop is available
export HADOOP_COMMON_HOME=/opt/hadoop/hadoop2.7

#Set path to where hadoop-*-core.jar is available
export HADOOP_MAPRED_HOME=/opt/hadoop/hadoop2.7

#Set the path to where bin/hive is available
export HIVE_HOME=/opt/hive/hive2.1
配置环境变量
vim /etc/profile
#sqoop config
export SQOOP_HOME=/opt/sqoop/sqoop1.4.7
export PATH=.:${JAVA_HOME}/bin:${SCALA_HOME}/bin:${SPARK_HOME}/bin:${HADOOP_HOME}/bin:${HADOOP_HOME}/sbin:${ZK_HOME}/bin:${HBASE_HOME}/bin:${HIVE_HOME}/bin:${KAFKA_HOME}/bin:${SQOOP_HOME}/bin:${FLUME_HOME}/bin:${STORM_HOME}/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$SQOOP_HOME/lib
刷新配置文件
source /etc/profile
启动MySQL
service mysqld start

测试连接MySQL
sqoop list-databases --connect jdbc:mysql://localhost:3306/ --username root -P

Sqoop伪分布式配置_第1张图片

转载于:https://www.cnblogs.com/studyNotesSL/p/11368242.html

你可能感兴趣的:(Sqoop伪分布式配置)