Centos 7 安装 tomcat

  • 时间:
  • 浏览:
  • 来源:互联网

1、下载

wget https://mirrors.bfsu.edu.cn/apache/tomcat/tomcat-8/v8.5.58/bin/apache-tomcat-8.5.58.tar.gz

2、解压

mkdir /usr/local/tomcat

tar -zxvf apache-tomcat-8.5.58.tar.gz -C /usr/local/tomcat/

3、配置 tomcat 环境变量

cd /usr/local/tomcat/apache-tomcat-8.5.58/bin

vim startup.sh,shutdown.sh 

# 脚本最上面加入
export JAVA_HOME=/usr/local/java/jdk1.8.0_231
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar
export PATH=$PATH:$JAVA_HOME/bin

export CATALINA_HOME=/usr/local/tomcat/apache-tomcat-8.5.58
export PATH=$PATH:$CATALINA_HOME/bin

4、启动

 

本文链接http://xiahunao.cn/article/show-994416.html