当前位置: > CentOS > CentOS教程 >

CentOS 7.0 安装tomcat

时间:2016-02-16 00:52来源:linux.it.net.cn 作者:IT
1、安装java



 

yum install -y java-1.7.0-openjdk


2、安装tomcat





tar zxf apache-tomcat-7.0.65.tar.gz -C /usr/local/

cd /usr/local/

ln -s apache-tomcat-7.0.65/ tomcat

vim /etc/profile.d/tomcat.sh

    export CATALINA_HOME=/usr/local/tomcat

    export PATH=$PATH:$CATALINA_HOME/bin

. /etc/profile.d/tomcat.sh

cp /usr/local/tomcat/bin/catalina.sh /etc/init.d/tomcat

vim /etc/init.d/tomcat

    # chkconfig: 2345 10 90

    # description:tomcat service

    CATALINA_HOME=/usr/local/tomcat

chkconfig --add tomcat

chkconfig tomcat on

service tomcat start
(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容