2.6. JDK Requirements

Your system must have the correct JDK installed on all the nodes of the cluster. HDP requires Oracle JDK 1.6 update 31.

Use the following instructions to manually install JDK 1.6 update 31:

  1. Check the version. From a terminal window, type:

    java -version
  2. (Optional) Uninstall the Java package if the JDK version is less than v1.6 update 31.

    rpm -qa | grep java
    yum remove {java-1.*}
  3. (Optional) Verify that the default Java package is uninstalled.

    which java
  4. Download the Oracle 64-bit JDK (jdk-6u31-linux-x64.bin) from the Oracle download site:

    http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jdk-6u31-oth-JPR

    Accept the license agreement.

  5. Change directory to the location where you downloaded the JDK and run the install.

    mkdir /usr/jdk1.6.0_31
    cd /usr/jdk1.6.0_31
    chmod u+x $JDK_download_directory/jdk-6u31-linux-x64.bin
    $JDK_download_directory/jdk-6u31-linux-x64.bin 
    
  6. Create symbolic links (symlinks) to the JDK.

    mkdir /usr/java
    ln -s /usr/jdk1.6.0_31/jdk1.6.0_31 /usr/java/default
    ln -s /usr/java/default/bin/java /usr/bin/java
    
  7. Set up your environment to define JAVA_HOME to put the Java Virtual Machine and the Java compiler on your path.

    export JAVA_HOME=/usr/java/default
    export PATH=$JAVA_HOME/bin:$PATH

    Alternatively, you can also add a /etc/profile.d/java.sh file with the following content:

    export JAVA_HOME=/usr/java/default
    export PATH=$PATH:$JAVA_HOME/bin

loading table of contents...