Tomcat安装

[root@yznvm1 tmux-1.4]#wget http://download.oracle.com/otn-pub/java/jdk/6u30-b12/jdk-6u30-linux-x64.bin
 sh jdk-6u30-linux-x64.bin
 cd jdk1.6.0_30/
 mv jdk1.6.0_30 /usr/local/jdk
 /usr/local/jdk/bin/java -version
 wget http://labs.renren.com/apache-mirror/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz
 tar zxvf apache-tomcat-6.0.35.tar.gz
  mv apache-tomcat-6.0.35 /usr/local/tomcat
 vi /etc/profile 
输入如下

  export JAVA_HOME=/usr/local/jdk
  export PATH=$PATH:$JAVA_HOME/bin:/usr/local/apache/bin:/usr/local/tomcat/bin
  export CLASSPATH=$JAVA_HOME/lib
  source /etc/profile  
 /usr/local/tomcat/bin/catalina.sh start   
浏览器输入http://192.168.32.128:8080/可以正确看到页面即可。

如果不成功,请检查iptable 配置,或者关闭iptables :service iptables stop
[root@yznvm1 ROOT]# vi /usr/local/tomcat/webapps/ROOT/test.jsp
<body>
<center>
Now time: <%=new java.util.Date()%>
</center>
</body>
</html>
浏览器输入 http://192.168.32.128:8080/test.jsp ,即可

posted @ 2012-01-11 15:08  羽化成蝶  阅读(182)  评论(0编辑  收藏  举报