十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
这篇文章主要介绍了Sqoop2如何安装配置,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。
创新新互联,凭借十载的成都网站建设、做网站经验,本着真心·诚心服务的企业理念服务于成都中小企业设计网站有成百上千案例。做网站建设,选成都创新互联。
一、安装hadoop
略
二、安装sqoop2
1.选择对应的sqoop2
[hadoop@hftclclw0001 ~]$ pwd /home/hadoop [hadoop@hftclclw0001 ~]$ wget http://apache.mirrors.tds.net/sqoop/1.99.6/sqoop-1.99.6-bin-hadoop200.tar.gz [hadoop@hftclclw0001 ~]$ tar -zxvf sqoop-1.99.6-bin-hadoop200.tar.gz [hadoop@hftclclw0001 ~]$ cd sqoop-1.99.6-bin-hadoop200/server/conf/ [hadoop@hftclclw0001 conf]$ pwd /home/hadoop/sqoop-1.99.6-bin-hadoop200/server/conf [hadoop@hftclclw0001 conf]$ ls -al total 220 drwx------ 2 hadoop root 4096 Oct 19 08:15 . drwx------ 10 hadoop root 4096 Oct 19 08:15 .. -rw------- 1 hadoop root 10636 Apr 29 2013 catalina.policy -rw------- 1 hadoop root 4590 Apr 29 02:41 catalina.properties -rw------- 1 hadoop root 1395 Apr 29 2013 context.xml -rw------- 1 hadoop root 3290 Apr 29 2013 logging.properties -rw------- 1 hadoop root 6528 Apr 29 02:41 server.xml -rw------- 1 hadoop root 1586 Apr 29 02:41 sqoop_bootstrap.properties -rw------- 1 hadoop root 7483 Apr 29 02:41 sqoop.properties -rw------- 1 hadoop root 1530 Apr 29 2013 tomcat-users.xml -rw------- 1 hadoop root 163769 Apr 29 2013 web.xml 修改catalina.properties.将hadoop的jar包依赖进来。当然,如果还需要hive或是hbase,对应的jar包也要加入 [hadoop@hftclclw0001 conf]$ vi catalina.properties common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/../lib/*.jar,/home/hadoop/hadoop-2.2.0/share/hadoop/common/*.jar,/home/hadoop/hadoop-2.2.0/share/hadoop/common/lib/*.jar,/home/hadoop/hadoop-2.2.0/share/hadoop/yarn/*.jar,/home/hadoop/hadoop-2.2.0/share/hadoop/hdfs/*.jar,/home/hadoop/hadoop-2.2.0/share/hadoop/mapreduce/*.jar [hadoop@hftclclw0001 conf]$ vi sqoop.properties org.apache.sqoop.submission.engine.mapreduce.configuration.directory=/home/hadoop/hadoop-2.2.0/etc/hadoop 添加MySQL driver mysql-connector-java-5.1.25-bin.jar 注意版本 [root@hftclclw0001 lib]# pwd /home/hadoop/sqoop-1.99.6-bin-hadoop200/server/lib [root@hftclclw0001 lib]# ls -al total 6284 drwx------ 2 hadoop root 4096 Oct 19 08:33 . drwx------ 10 hadoop root 4096 Oct 19 08:15 .. -rw------- 1 hadoop root 15241 Apr 29 2013 annotations-api.jar -rw------- 1 hadoop root 54567 Apr 29 2013 catalina-ant.jar -rw------- 1 hadoop root 132134 Apr 29 2013 catalina-ha.jar -rw------- 1 hadoop root 1244212 Apr 29 2013 catalina.jar -rw------- 1 hadoop root 237615 Apr 29 2013 catalina-tribes.jar -rw------- 1 hadoop root 1801636 Apr 29 2013 ecj-4.2.2.jar -rw------- 1 hadoop root 33315 Apr 29 2013 el-api.jar -rw------- 1 hadoop root 112556 Apr 29 2013 jasper-el.jar -rw------- 1 hadoop root 527739 Apr 29 2013 jasper.jar -rw------- 1 hadoop root 76691 Apr 29 2013 jsp-api.jar -rw------- 1 hadoop root 848401 Oct 19 08:33 mysql-connector-java-5.1.25-bin.jar -rw------- 1 hadoop root 88575 Apr 29 2013 servlet-api.jar -rw------- 1 hadoop root 8821 Apr 29 02:41 sqoop-tomcat-1.99.6.jar -rw------- 1 hadoop root 776946 Apr 29 2013 tomcat-coyote.jar -rw------- 1 hadoop root 253635 Apr 29 2013 tomcat-dbcp.jar -rw------- 1 hadoop root 70014 Apr 29 2013 tomcat-i18n-es.jar -rw------- 1 hadoop root 51903 Apr 29 2013 tomcat-i18n-fr.jar -rw------- 1 hadoop root 54511 Apr 29 2013 tomcat-i18n-ja.jar
2.启动
[root@hftclclw0001 bin]# pwd /home/hadoop/sqoop-1.99.6-bin-hadoop200/bin [root@hftclclw0001 bin]# ./sqoop2-server start Sqoop home directory: /home/hadoop/sqoop-1.99.6-bin-hadoop200 Setting SQOOP_HTTP_PORT: 12000 Setting SQOOP_ADMIN_PORT: 12001 Using CATALINA_OPTS: Adding to CATALINA_OPTS: -Dsqoop.http.port=12000 -Dsqoop.admin.port=12001 Using CATALINA_BASE: /home/hadoop/sqoop-1.99.6-bin-hadoop200/server Using CATALINA_HOME: /home/hadoop/sqoop-1.99.6-bin-hadoop200/server Using CATALINA_TMPDIR: /home/hadoop/sqoop-1.99.6-bin-hadoop200/server/temp Using JRE_HOME: /usr Using CLASSPATH: /home/hadoop/sqoop-1.99.6-bin-hadoop200/server/bin/bootstrap.jar
3. UI 访问 {ip}:12000
http://hftclclw0001:12000/
4.客户端访问
[hadoop@hftclclw0001 sqoop-1.99.6-bin-hadoop200]$ ./bin/sqoop2-shell Sqoop home directory: /home/hadoop/sqoop-1.99.6-bin-hadoop200 Oct 19, 2015 8:39:47 AM java.util.prefs.FileSystemPreferences$1 run INFO: Created user preferences directory. Sqoop Shell: Type 'help' or '\h' for help. sqoop:000> sqoop:000>
感谢你能够认真阅读完这篇文章,希望小编分享的“Sqoop2如何安装配置”这篇文章对大家有帮助,同时也希望大家多多支持创新互联,关注创新互联行业资讯频道,更多相关知识等着你来学习!