文章目录

1.Mac环境

1.前提:需要安装jdk

jdk版本

localhost:bin gaoxinfu$ java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
localhost:bin gaoxinfu$

1.1.下载

​https://tomcat.apache.org/download-80.cgi​

Tomcat安装与使用_apache

1.2.解压

localhost:tomcat gaoxinfu$ pwd
/Users/gaoxinfu/using/tomcat
localhost:tomcat gaoxinfu$ ls -la|grep apache-tomcat-8.5.50.tar.gz
-rw-r--r--@ 1 gaoxinfu staff 10305939 2 10 08:49 apache-tomcat-8.5.50.tar.gz
localhost:tomcat gaoxinfu$
localhost:tomcat gaoxinfu$ tar -zxvf apache-tomcat-8.5.50.tar.gz

解压后

localhost:tomcat gaoxinfu$ ls -la|grep apache-tomcat-8.5.50
drwxr-xr-x 16 gaoxinfu staff 512 2 10 08:52 apache-tomcat-8.5.50
-rw-r--r--@ 1 gaoxinfu staff 10305939 2 10 08:49 apache-tomcat-8.5.50.tar.gz
localhost:tomcat gaoxinfu$

1.3.启动

localhost:bin gaoxinfu$ sh startup.sh 
Using CATALINA_BASE: /Users/gaoxinfu/using/tomcat/apache-tomcat-8.5.50
Using CATALINA_HOME: /Users/gaoxinfu/using/tomcat/apache-tomcat-8.5.50
Using CATALINA_TMPDIR: /Users/gaoxinfu/using/tomcat/apache-tomcat-8.5.50/temp
Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
Using CLASSPATH: /Users/gaoxinfu/using/tomcat/apache-tomcat-8.5.50/bin/bootstrap.jar:/Users/gaoxinfu/using/tomcat/apache-tomcat-8.5.50/bin/tomcat-juli.jar
Tomcat started.
localhost:bin gaoxinfu$

Tomcat安装与使用_java_02

2.Idea中的Tomcat部署web项目