Hadoop集群搭建(十一)~Sqoop安装
1,把安装包导进来并解压
2,conf目录下的 sqoop-env-template.sh 改成 sqoop-env.sh
[root@master conf]# mv sqoop-env-template.sh sqoop-env.sh
3,在sqoop-env.sh文件中添加配置信息
export HADOOP_COMMON_HOME=/opt/module/hadoop-2.7.2 export HADOOP_MAPRED_HOME=/opt/module/hadoop-2.7.2 export HIVE_HOME=/opt/module/hive export ZOOKEEPER_HOME=/opt/module/zookeeper-3.4.10 export ZOOCFGDIR=/opt/module/zookeeper-3.4.10 export HBASE_HOME=/opt/module/hbase
4,拷贝JDBC驱动包到sqoop的lib目录下
[root@master sqoop]# cp /opt/software/mysql-libs/mysql-connector-java-5.1.27/mysql-connector-java-5.1.27-bin.jar ./lib
5,验证sqoop
[root@master sqoop]# bin/sqoop help
6,测试Sqoop是否能够成功连接数据库
[root@master sqoop]# bin/sqoop list-databases --connect jdbc:mysql://master:3306/ --username root --password 000000 20/03/23 09:09:54 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6 20/03/23 09:09:54 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead. 20/03/23 09:09:55 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset. information_schema metastore mysql performance_schema test
大功告成~