您好,登錄后才能下訂單哦!
這篇文章主要介紹了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如何安裝配置”這篇文章對大家有幫助,同時也希望大家多多支持億速云,關注億速云行業資訊頻道,更多相關知識等著你來學習!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。