Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change 
notification.

The following page has been changed by SteveLoughran:
http://wiki.apache.org/hadoop/Running_Hadoop_On_Ubuntu_Linux_%28Single-Node_Cluster%29

The comment on the change is:
update to java 6, still need to work on networking setup

------------------------------------------------------------------------------
  
  = Prerequisites =
  
- == Sun Java 1.5.0 ==
+ == Sun Java  ==
  
- Hadoop requires a working Java 1.5.x (aka 5.0.x) installation. However, using 
[http://www.nabble.com/14.1-to-14.2-t4604384.html Java 1.6.x (aka 6.0.x) is 
recommended] for running Hadoop. For the sake of this tutorial, I will describe 
the installation of Java 1.5. But if you want Java 1.6 (which you should), 
simply use the package {{{sun-java6-jdk}}} and adjust the paths described below 
as needed.
+ Hadoop requires a working Java 1.6.x (aka Java 6) installation. Use the 
package {{{sun-java6-jdk}}} and adjust the paths described below as needed.
  
- Install Sun's Java Development Kit (JDK) v1.5.0 via {{{Synaptic}}} ({{{System 
> Administration > Synaptic Package Manager}}}) or via {{{apt-get}}}. Install 
the package
+ Install Sun's Java Development Kit (JDK) via {{{Synaptic}}} ({{{System > 
Administration > Synaptic Package Manager}}}) or via {{{apt-get}}}. Install the 
package
  
  {{{
-   sun-java5-jdk
+    sun-java6-jdk
  }}}
  
- for the full JDK which will be placed in {{{/usr/lib/jvm/java-1.5.0-sun}}}.
+ for the full JDK which will be placed in a location such as 
{{{/usr/lib/jvm/java-6-sun-1.6.0.14}}} with a symbolic link 
{{{/usr/lib/jvm/java-6-sun}}} set up to point to this version.
  
  After installation, check if Sun's JDK is on top of {{{/etc/jvm}}}. For 
example, mine looks like this:
  
@@ -42, +42 @@

    # JVM should list their JAVA_HOME compatible directory in this file.
    # The default system JVM is the first one available from top to
    # bottom.
-   
+ 
+   #this an example file for a 64 bit ubuntu server
-   /usr/lib/jvm/java-1.5.0-sun
+   /usr/lib/jvm/java-6-sun
-   /usr/lib/jvm/java-gcj
+   /usr/lib/jvm/java-6-openjdk
-   /usr/lib/jvm/ia32-java-1.5.0-sun
+   /usr/lib/jvm/ia32-java-6-sun
-   /usr
  }}}
+ 
+ 
  
  == Adding a dedicated Hadoop system user ==
  
@@ -143, +145 @@

  
  === hadoop-env.sh ===
  
- The only required environment variable we have to configure for Hadoop in 
this tutorial is {{{JAVA_HOME}}}. Open 
{{{<HADOOP_INSTALL>/conf/hadoop-env.sh}}} in the editor of your choice (if you 
used the installation path in this tutorial, the full path is 
{{{/usr/local/hadoop/conf/hadoop-env.sh}}}) and set the {{{JAVA_HOME}}} 
environment variable to the Sun JDK/JRE 1.5.0 directory.
+ The only required environment variable we have to configure for Hadoop in 
this tutorial is {{{JAVA_HOME}}}. Open 
{{{<HADOOP_INSTALL>/conf/hadoop-env.sh}}} in the editor of your choice (if you 
used the installation path in this tutorial, the full path is 
{{{/usr/local/hadoop/conf/hadoop-env.sh}}}) and set the {{{JAVA_HOME}}} 
environment variable to the Sun JDK/JRE directory.
  
  Change
  
  {{{
    # The java implementation to use.  Required.
-   # export JAVA_HOME=/usr/lib/j2sdk1.5-sun
+   # export JAVA_HOME=/usr/lib/j2sdk1.6-sun
  }}}
  
  to
  
  {{{
    # The java implementation to use.  Required.
-   export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
+   export JAVA_HOME=/usr/lib/jvm/java-6-sun
  }}}
  
- If you chose to use Java 1.6, remember to put the correct paths in here!
+ Alternatively, you could set up the Java home value in bash, for every user. 
Do this in {{{/etc/bash.bashrc}}}
+ 
+ {{{
+   export JAVA_HOME=/usr/lib/jvm/java-6-sun
+   export JDK_HOME=$JAVA_HOME
+   export PATH=$PATH:$JAVA_HOME/bin
+ }}}
  
  === hadoop-site.xml ===
  

Reply via email to