查看当前版本
java -version
java version “1.4.2”
卸载1.4
rpm -qa |grep java
java-1.4.2-gcj-compat-1.4.2.0-26jpp
……
rpm -e java-1.4.2-gcj-compat-1.4.2.0-26jpp
2010-11-5更新 jdk6 6u2364位版
http://www.java.net/download/jdk6/6u23/promoted/b03/binaries/jdk-6u23-ea-bin-b03-linux-amd64-18_oct_2010-rpm.bin
======================
安装jdk1.6
wget http://www.java.net/download/jdk6/6u18/promoted/b04/binaries/jdk-6u18-ea-bin-b04-linux-i586-28_oct_2009-rpm.bin
chmod 755 jdk-6u18-ea-bin-b04-linux-i586-28_oct_2009-rpm.bin\?e\=1257754475\&h\=106947ca348d71bef632eb95d717de05
./jdk-6u18-ea-bin-b04-linux-i586-28_oct_2009-rpm.bin\?e\=1257754475\&h\=106947ca348d71bef632eb95d717de05
一路空格后健入yes
查看当前版本
java -version
java version “1.6.0”
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)
2010-11-5更新
tomcat 新的版本及下载地址
http://labs.renren.com/apache-mirror/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.tar.gz
=======================
安装tomcat
wget http://labs.xiaonei.com/apache-mirror/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
tar zxvf apache-tomcat-6.0.20.tar.gz
mv apache-tomcat-6.0.20 /opt/tomcat
设置环境变量
vi /etc/profile
JAVA_HOME=/usr/java/jdk1.6.0_20
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export CLASSPATH
export JDK_HOME=${JAVA_HOME}
export CATALINA_BASE=/opt/tomcat
export CATALINA_HOME=/opt/tomcat
启动tomcat
source /etc/profile
/opt/tomcat/bin/startup.sh
打开8080防火墙
iptables -A INPUT -p tcp -m tcp –dport 8080 -j ACCEPT
service iptables save
service iptables restart
http://localhost:8080
参考:
http://blog.c1gstudio.com/archives/142
tomcat安全设置
http://blog.c1gstudio.com/archives/865
优化tomcat 内存
http://blog.c1gstudio.com/archives/276
No Responses (yet)
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.