1、下载JDK
2、安装JDK
# mkdir -p /usr/local/java
# cd /usr/local/java
# mv /path/to/jre-1_5_0_05-linux-amd64.bin
# chmod u+x jre-1_5_0_05-linux-amd64.bin
# ./jre-1_5_0_05-linux-amd64.bin
3、设置环境变量
PATH=$PATH:/usr/local/java/jre1.5.0_05/bin
JAVA_HOME=/usr/local/java/jre1.5.0_05
export $PATH $JAVA_HOME