1.安装JAVA环境
sudo apt-get install sun-java5-jre
2.下载tomcat: http://tomcat.apache.org/
3.解压tomcat
$sudo tar zxvf apache-tomcat-7.0.26.tar.gz -C /opt
$sudo mv /opt/apache-tomcat-7.0.26.tar.gz /opt/tomcat
4.启动tomcat
$sudo /opt/tomcat/bin/startup.sh
如果能看到下列提示,就表明启动成功了!
>Using CATALINA_BASE: /opt/tomcat
>Using CATALINA_HOME: /opt/tomcat
>Using CATALINA_TMPDIR: /opt/tomcat/temp
>Using JRE_HOME: /usr/lib/j2sdk1.5-sun
打开Firefox,在地址栏中输入http://localhost:8080,如果出来Tomcat的缺省界面,说明测试通过!
5.停止Tomcat服务
$sudo /opt/tomcat/bin/shutdown.sh