1.下载jdk-6u45-linux-i586-rpm.bin 地址:http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html
2.yum -y install glibc.i686
3.
mkdir /usr/java
cd /usr/java
chmod +x jdk-6u45-linux-i586-rpm.bin
./jdk-6u45-linux-i586-rpm.bin
vi + /etc/profile
向文件里面追加以下内容:
--------------------------------------------------------
JAVA_HOME=/usr/java/jdk1.6.0_45
JRE_HOME=/usr/java/jdk1.6.0_45/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
export JAVA_HOME JRE_HOME PATH CLASSPATH
-------------------------------------------------
source /etc/profile
echo $PATH
4.tomcat
cd /usr/local
wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-7/v7.0.54/bin/apache-tomcat-7.0.54.tar.gz
tar -zxv -f apache-tomcat-7.0.54.tar.gz // 解压压缩包
rm -rf apache-tomcat-7.0.54.tar.gz // 删除压缩包
mv apache-tomcat-7.0.54 tomcat
/usr/local/tomcat/bin/startup.sh //启动tomcat
网站根目录:/usr/local/tomcat/webapps/ROOT/