Ubuntuã§Hadoop(CDH3)ã使ã£ã¦ã¿ãããªã¼ãã£ã¦ã¨ãã«Javaãå ¥ãããã¨ãã¦Java Development Kit Installation - Cloudera Supportã®è¨ãµã¨ã»ãã«ãã¦ãæ®å¿µãªãã¨ã«ãªã£ã¦ãã¾ã²ã¾ãã
Java SE Downloadsã«ããã¨ãå®ã¯Ubuntuã³ãã¥ããã£ãããã¼ããã¼ã®ã¢ã¼ã«ã¤ãã«Javaããã±ã¼ã¸ã«ã¤ãã¦ã®éè¦ãªãç¥ãããªãã¦ã¢ãã¦ã³ã¹ãåºã¦ãã¦ã2011å¹´12æã«ãªãã¸ããªããåé¤ããã¡ãã£ããã§ããã
ã¤ã¾ããWebã§ãUbuntu sun-java6 ã¤ã³ã¹ãã¼ã«ãã¨ãæ¤ç´¢ãã¦åºã¦ãããµã¤ãã§ç´¹ä»ããã¦ãadd-apt-repository "deb http://archive.canonical.com/ RELEASE partner"
ã¿ãããªã³ã¼ãã§å°å
¥ããæ¹æ³ã¯å
¨æ»
ãã¦ãã¾ã²ã¾ããããªãããã
Ubuntuããå示ãããåé¿çã¯ãµãã¤ã
- openjdk-6-jdk ã«éæ¿ã¸ãã
- Java SE Downloadsããããã±ã¼ã¸ãæåã§å°å ¥
1.ã¯(å°ãã¨ã2012å¹´1æç¾å¨ã§ã¯)å²ã¨è«å¤æ°å³ã§ãCDH3ã¯Sun Java1.6ã®ã¿ãåä½ä¿è¨¼ã¨ãªã£ã¦ããããã¶ãåãããããªããã¨ã¯æã£ã¦ããã©ãClauderaã¯æ¨å¥¨ããªããã¼ã£ã¦è¨ã£ã¦ããããã®ã§ãã¨ããã¸ããã¾ã®ã¨ããã¯ãã¹ã
2.ã¯ã¢ã¬ã ãããã©ããç¾å®ã«ã¯ãã¼ã«ã«ã«ç¢ºä¿ãã¦ããã¦ã¤ã³ã¹ãã¼ã«ãããã¨ããã«ã³ãã¼ãã¦æã£ã¦ããéç¨ã«ãªãã®ããªãEC2ã§ã¯ã©ã¹ã¿ãä½ãããã¨ãã¯S3ä¸ã«ç½®ãã¨ãã®ã便å©ã ã¨æãµã
ã§ãããã ããããã£ããUbuntuãªãã ãããAPTã®ä¸çã§å®çµãããããã¼ã£ã¦æã²ãããã¾ãã¦ã
ã§ãæ¢ãã¦ã¿ããLaunchpadã«Sun Java6 Community PPAãªãã¦ãã®ãããã¾ãã¦ããã£ãã¼ï¼
ã§ããã®PPAãå ¬éãã¦ãCommunity Team to provide regular Sun Java Updatesã¯ã¡ã³ãã¼ã²ã¨ãã§ãä½ã£ãããã¢ãããã¼ããããã¦ãªã? ã¨ã¾ãæªããæ群ã§ã¯ããã¾ãããã¾ã使ã¸ãããªã®ã§ã
sudo add-apt-repository ppa:sun-java-community-team/sun-java6 sudo apt-get update
ããã§ãªãã¸ããªã«è¿½å ã§ããã¯ãã§ãããããã確èªãã¦ã¿ã¾ãããã¼ã
$ apt-cache showpkg sun-java6-jdk Package: sun-java6-jdk Versions: 6.21dlj-0ubuntu1~lucid1~ppa1 (/var/lib/apt/lists/ppa.launchpad.net_sun-java-community-team_sun-java6_ubuntu_dists_lucid_main_binary-i386_Packages) (/var/lib/dpkg/status) Description Language: File: /var/lib/apt/lists/ppa.launchpad.net_sun-java-community-team_sun-java6_ubuntu_dists_lucid_main_binary-i386_Packages MD5: cb47d4c49fa7317c472613b7010ef9d8 Reverse Depends: sun-java6-source,sun-java6-jdk 6.21dlj-0ubuntu1~lucid1~ppa1 sun-java6-javadb,sun-java6-jdk sun-java6-javadb,sun-java6-jdk 6.21dlj-0ubuntu1~lucid1~ppa1 sun-java6-demo,sun-java6-jdk sun-java6-demo,sun-java6-jdk sun-java6-demo,sun-java6-jdk 6.21dlj-0ubuntu1~lucid1~ppa1 eclipse-jdt,sun-java6-jdk libnb-java3-java,sun-java6-jdk Dependencies: 6.21dlj-0ubuntu1~lucid1~ppa1 - sun-java6-bin (2 6.21dlj-0ubuntu1~lucid1~ppa1) libc6 (0 (null)) libx11-6 (0 (null)) debconf (18 0.5) debconf-2.0 (0 (null)) sun-java6-demo (0 (null)) openjdk-6-doc (0 (null)) sun-java6-source (0 (null)) Provides: 6.21dlj-0ubuntu1~lucid1~ppa1 - java6-sdk java5-sdk java2-sdk java2-compiler java-sdk java-compiler Reverse Provides:
ãã£ã¨ãããããã¼ã¸ã§ã³ããã®ãã¨æã£ããupdate21ãããªãã¦ãã£ãããªæ°åãããã¤ã¤ãCDH3ãæ¨å¥¨ãã¦ããã¼ã¸ã§ã³ã¯update20ã¨update21ã®äºã¤ãªã®ã§ãã¾ãä»åã«éã£ã¦ã¯é¡ã£ããå¶ã£ããã§ããã
ãããä»åº¦ããã¤ã³ã¹ãã¼ã«ãã¦ã¿ã¾ãããã
sudo apt-get install sun-java6-jdk=6.21dlj-0ubuntu1~lucid1~ppa1
ãã®PPAèªä½ãå ¨ç¶ä¿å®ããã¦ãªããã§ä»å¾ãæ°ããsun-javaã追å ããããã¨ã¯ãªãæ°ããããã§ããã©ã欲ãããã¼ã¸ã§ã³ã¯update21ã§å°æ¥å¥ã®ãã¼ã¸ã§ã³ã追å ããã¦ãå°ããã¨ã«ã¯å°ããã§ã念ã®ãããã¼ã¸ã§ã³ãæå®ãã¦ããã¾ãã
ã©ã¤ã»ã³ã¹èªãã ãåæãããã¿ãããªé¸æè¢ãé¸ã¶ã®ãããã©ããã§ããã©ãã©ãã«ãèªååã§ããæ¹æ³ã¯ãªããã®ãâ¦â¦ã
ããã§sun-java6-jdkã¯å
¥ãã¯ããªãã§ãCDH3ãå
¥ããã«ã¯CDH3 Installation - Cloudera Supportã®To add the CDH3 repository
ã®è¨ãµã¨ã»ãã«å¾ã£ã¦ãªãã¸ããªã追å ãã¾ãã
echo deb http://archive.cloudera.com/debian lucid-cdh3 contrib | sudo tee -a /etc/apt/sources.list echo deb-src http://archive.cloudera.com/debian lucid-cdh3 contrib | sudo tee -a /etc/apt/sources.list curl -s http://archive.cloudera.com/debian/archive.key | sudo apt-key add - sudo apt-get update sudo apt-get install hadoop-0.20
ãããªæãã§CDHã®Hadoopä¸å¼ãå ¥ã£ãããããªããããã
$ hadoop version Hadoop 0.20.2-cdh3u2 Subversion file:///tmp/nightly_2011-10-13_20-02-02_3/hadoop-0.20-0.20.2+923.142-1~lucid -r 95a824e4005b2a94fe1c11f1ef9db4c672ba43cb Compiled by root on Thu Oct 13 21:52:18 PDT 2011 From source with checksum 644e5db6c59d45bca96cec7f220dda51
Javaãå ¥ã£ã¦ãªãã¨å¤ãªã¡ãã»ã¼ã¸ãåºã¦ããã¯ããªãã§ãããªã¢ã¼ã¨ãºãã¶ãããã§ãï½ã
hadoop jar /usr/lib/hadoop/hadoop-examples.jar pi 2 10000000
ã¨ããã£ã¦åããããã¹ã¿ã³ãã¢ãã³ã¢ã¼ãã§ã¯åä½ãããã¨ã確èªã§ãã¾ããããã¶ãã