ITPub博客

Debian下安装Tomcat

原创 作者:xuniji123 时间:2008-08-26 17:17:33 0 删除 编辑

http://tomcat.apache.org/download-60.cgi

下载apache-tomcat-6.0.18.tar.gz

拷贝到/usr/soft/tomcat

并在目录/usr/soft/tomcat

执行tar –xzvf apache-tomcat-6.0.18.tar.gz

将解压生成apache-tomcat-6.0.18文件夹,为了简单,将其更名为tomcat6

mv apache-tomcat-6.0.18 tomcat6

如果已经设置好JRE_HOME环境变量,则可在目录/usr/soft/tomcat/tomcat6/bin下执行

./startup.sh驱动tomcat

./shutdown.sh关闭tomcat

设置环境变量TOMCAT_HOMECATALINA_HOME,修改/etc/profile文件如下:

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))

# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "`id -u`" -eq 0 ]; then

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

else

PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"

fi

if [ "$PS1" ]; then

if [ "$BASH" ]; then

PS1='u@h:w$ '

else

if [ "`id -u`" -eq 0 ]; then

PS1='# '

else

PS1='$ '

fi

fi

fi

PATH=$PATH:/usr/soft/java/jdk/bin:/usr/soft/java/jdk/jre/bin

JAVA_HOME=/usr/soft/java/jdk

JRE_HOME=/usr/soft/java/jdk/jre

CLASSPATH=.:/usr/soft/java/jdk/lib/tools.jar:/usr/soft/java/jdk/lib/dt.jar

TOMCAT_HOME=/usr/soft/tomcat/tomcat6

CATALINA_HOME=/usr/soft/tomcat/tomcat6

export PATH

export JAVA_HOME

export JRE_HOME

export CLASSPATH

export TOMCAT_HOME

export CATALINA_HOME

umask 022

[@more@]

上一篇: Debian下安装Java
下一篇: Debian下安装Eclipse
请登录后发表评论 登录
全部评论
  • 博文量
    44
  • 访问量
    436122