【MAC装机】下载安装Tomcat8

【MAC装机】下载安装Tomcat8


文章目录

  • 一、Tomcat下载
  • 二、解压安装
  • 三、启动Tomcat
  • 四、查看是否启动成功


一、Tomcat下载

Tomcat8官网地址
我选择的是8.5.83的zip包(若所处网络环境打不开tomcat官网可尝试使用手机流量热点)

二、解压安装

解压zip包,到bin目录下尝试启动tomcat:

username@usernameMBP bin % ls -all
...
-rw-r--r--@  1 username  staff   16840 10  3 21:11 catalina.bat
-rw-r--r--@  1 username  staff   25294 10  3 21:11 catalina.sh
-rw-r--r--@  1 username  staff    2022 10  3 21:11 startup.bat
-rw-r--r--@  1 username  staff    1904 10  3 21:11 startup.sh
...
username@usernameMBP bin % sh ./startup.sh
Cannot find ./catalina.sh
The file is absent or does not have execute permission
This file is needed to run this program

默认权限是644,需要调整为755再启动

sudo chmod 755 ./*.sh
username@usernameMBP bin % ls -all
...
-rwxr-xr-x@  1 username  staff   25294 10  3 21:11 catalina.sh
-rwxr-xr-x@  1 username  staff    1904 10  3 21:11 startup.sh
...

三、启动Tomcat

username@usernamedeMBP bin % sh ./startup.sh
Using CATALINA_BASE:   /Users/username/Downloads/apache-tomcat-8.5.83
Using CATALINA_HOME:   /Users/username/Downloads/apache-tomcat-8.5.83
Using CATALINA_TMPDIR: /Users/username/Downloads/apache-tomcat-8.5.83/temp
Using JRE_HOME:        /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
Using CLASSPATH:       /Users/username/Downloads/apache-tomcat-8.5.83/bin/bootstrap.jar:/Users/username/Downloads/apache-tomcat-8.5.83/bin/tomcat-juli.jar
Using CATALINA_OPTS:   
Tomcat started.
username@usernamedeMBP bin %

四、查看是否启动成功

访问 http://localhost:8080

你可能感兴趣的:(MAC装机系列,tomcat,macos)