1.进入/opt
cd /opt
2.解压sqoop安装包
tar -zxf sqoop-1.4.6-cdh5.14.2.tar.gz
3.将sqoop移动到soft/sqoop146下
mv sqoop-1.4.6-cdh5.14.2 soft/sqoop146
4.进入soft/sqoop146/conf/
cd soft/sqoop146/conf/
5.复制sqoop-env-template.sh为sqoop-env.sh
cp sqoop-env-template.sh sqoop-env.sh
6.修改sqoop-env.sh
vim sqoop-env.sh
6.1.删除HADOOP_COMMON_HOME,HADOOP_MAPRED_HOME和HIVE_HOME前的#,并修改
export HADOOP_COMMON_HOME=/opt/soft/hadoop260
export HADOOP_MAPRED_HOME=/opt/soft/hadoop260
export HIVE_HOME=/opt/soft/hive110
7.在/opt/soft/sqoop146/lib中加入驱动java-json和mysql-connector-java
8.将hadoop和hive架包复制到/opt/soft/sqoop146/lib/下
cp /opt/soft/hadoop260/share/hadoop/common/hadoop-common-2.6.0-cdh5.14.2.jar /opt/soft/sqoop146/lib/
cp /opt/soft/hive110/lib/hive-jdbc-1.1.0-cdh5.14.2-standalone.jar /opt/soft/sqoop146/lib/
9.修改/etc/profile
vim /etc/profile
9.1.添加Sqoop运行环境
#Sqoop env
export SQOOP_HOME=/opt/soft/sqoop146
export PATH=$PATH:$SQOOP_HOME/bin
10.执行/etc/profile
source /etc/profile
输入命令sqoop help如果出现以下图示则安装sqoop成功!