安装 tomcat

1.首先安装 oracle java 7.

方法是:

sudo aptitude  install oracle-java7-installer
详见前一篇文章:

http://blog.csdn.net/CaspianSea/article/details/24854563

设置相关环境变量如下:

export JAVA_HOME=/usr/lib/jvm/java-7-oracle
export JRE_HOME=/usr/lib/jvm/java-7-oracle/jre

2. 安装 tomcat

下载: http://mirrors.hust.edu.cn/apache/tomcat/tomcat-7/v7.0.56/bin/apache-tomcat-7.0.56.zip

解压,放到 /usr/local. 并建立链接:

sudo ln -s apache-tomcat-7.0.56 tomcat

在 catalina.sh 里开始位置加入:

CATALINA_HOME=/usr/local/apache-tomcat-7.0.56
启动tomcat:

/usr/local/tomcat/bin/catalina.sh start
Using CATALINA_BASE:   /usr/local/apache-tomcat-7.0.56
Using CATALINA_HOME:   /usr/local/apache-tomcat-7.0.56
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-7.0.56/temp
Using JRE_HOME:        /usr/lib/jvm/java-7-oracle/jre
Using CLASSPATH:       /usr/local/apache-tomcat-7.0.56/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0.56/bin/tomcat-juli.jar
Tomcat started.
在浏览器里输入 

http://localhost:8080/

可以打开 tomcat的主页。


参考:

http://blog.csdn.net/zhuying_linux/article/details/6583096


你可能感兴趣的:(tomcat)