The Hadoop installation in this article is based on the Hortonworks RPMs installation
Documents See: Http://docs.hortonworks.com/CURRENT/index.htm
Http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u31-download-1501634.html
Download Java jdk-6u31-linux-x64.bin
#Java settings
chmod U+x/home/jdk-6u31-linux-x64.bin
/home/jdk-6u31-linux-x64.bin-noregister
MV jdk1.6.0_31/usr/
#Create Symbolic Links (symlinks) to the JDK.
Mkdir/usr/java
Ln-s/usr/jdk1.6.0_31//usr/java/default
Ln-s/usr/java/default/bin/java/usr/bin/java
#Set up your environment to define Java_home
#to put the Java Virtual Machine and the Java compiler on your path.
echo "Export Java_home=/usr/java/default" >>/etc/profile
echo "Export path=\ $JAVA _home/bin:\ $PATH" >>/etc/profile
Source/etc/profile
This article is from the "Shadow Knight" blog, please be sure to keep this source http://andylhz2009.blog.51cto.com/728703/1019703