tar zxvf apache-tomcat-6.0.29.tar.gz
mv apache-tomcat-6.0.29 /usr/local/tomcat
chmod +x jdk-6u20-linux-x64.bin
./jdk-6u20-linux-x64.bin
mv jdk1.6.0_20 /usr/local/
cat >> /etc/profile << EFF
############################################
TMOUT=3600
JAVA_HOME="/usr/local/jdk1.6.0_20"
CLASS_PATH="$JAVA_HOME/lib:$JAVA_HOME/jre/lib"
PATH=".:$PATH:$JAVA_HOME/bin"
CATALINA_HOME="/usr/local/tomcat"
TOMCAT_HOME="/usr/local/tomcat"
export JAVA_HOME CATALINA_HOME CLASS_PATH PATH TOMCAT_HOME
############################################
EFF
source /etc/profile