本文的hadoop安装是基于hortonworks的RPMS安装
文档请见:http://docs.hortonworks.com/CURRENT/index.htm
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u31-download-1501634.html
下载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
本文转自andylhz 51CTO博客,原文链接:http://blog.51cto.com/andylhz2009/1019703,如需转载请自行联系原作者