码迷,mamicode.com
首页 > 其他好文 > 详细

Sqoop配置

时间:2019-08-17 14:19:53      阅读:63      评论:0      收藏:0      [点我收藏+]

标签:vim   art   mapr   roo   dir   组件   comm   com   环境   

解压和重命名文件
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配置

标签:vim   art   mapr   roo   dir   组件   comm   com   环境   

原文地址:https://www.cnblogs.com/studyNotesSL/p/11368242.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!