chmod +x jdk-6u45-linux-i586.bin
安装./jdk-6u45-linux-i586.bin jdk
mv jdk1.6.0_45/ /usr/
java -version
在进行配置环境变量
#vi /etc/profile
添加
JAVA_HOME=/usr/java/jdk1.6.0_01
CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
export PATH CLASSPATH JAVA_HOME
显示java版本
[root@example bin]# java -version
java version "1.6.0"
/usr/local/tomcat/bin/startup.sh 启动tomcat
[root@example ~]# /usr/local/tomcat/bin/startup.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/java/jdk1.6.0_45
证明tomcat 安装成功