- 解压安装:# tar -zxvf 解压目录/安装包 -C 解压至目录
- 配置环境变量 # vi /etc/profile 添加export SQOOP_HOME=/opt/sqoop1.4.6
export PATH=$PATH:$SQOOP_HOME/bin -
修改sqoop-env.sh
# cd /opt/sqoop1.4.6/conf/
# cp sqoop-env-template.sh sqoop-env.sh
# vim sqoop-env.sh
# 在最后添加如下配置
export HADOOP_COMMON_HOME=/opt/hadoop2.6.0
export HADOOP_MAPRED_HOME=/opt/hadoop2.6.0
export HIVE_HOME=/opt/hive2.1.1 -
上传mysql驱动并放入 sqoop/lib/ 下
- 修改文件 sqoop/bin 下 # vim configure-sqoop 注释下面内容 命令搜索 /$ACCUMULO
#if [ ! -d "${ACCUMULO_HOME}" ]; then
# echo "Warning: $ACCUMULO_HOME does not exist! Accumulo imports will fail."
# echo 'Please set $ACCUMULO_HOME to the root of your Accumulo installation.'
#fi
# sqoop list-databases --username root --password 11111 --connect jdbc:mysql://192.168.210.70:3306/hive?characterEncoding=UTF-8 #测试通过sqoop查看mysql中hive库的所有表