這篇文章主要介紹了Sqoop2如何安裝配置,具有一定借鑒價(jià)值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。
創(chuàng)新新互聯(lián),憑借十載的成都網(wǎng)站建設(shè)、做網(wǎng)站經(jīng)驗(yàn),本著真心·誠(chéng)心服務(wù)的企業(yè)理念服務(wù)于成都中小企業(yè)設(shè)計(jì)網(wǎng)站有成百上千案例。做網(wǎng)站建設(shè),選成都創(chuàng)新互聯(lián)。
一、安裝hadoop
略
二、安裝sqoop2
1.選擇對(duì)應(yīng)的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包依賴(lài)進(jìn)來(lái)。當(dāng)然,如果還需要hive或是hbase,對(duì)應(yīng)的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.啟動(dòng)
[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 訪問(wèn) {ip}:12000
http://hftclclw0001:12000/
4.客戶(hù)端訪問(wèn)
[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>
感謝你能夠認(rèn)真閱讀完這篇文章,希望小編分享的“Sqoop2如何安裝配置”這篇文章對(duì)大家有幫助,同時(shí)也希望大家多多支持創(chuàng)新互聯(lián),關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,更多相關(guān)知識(shí)等著你來(lái)學(xué)習(xí)!