- 手动安装
1.官网下载Tomcat
2.解压Tomcat到目录:/usr/local
中
3.设置系统环境变量:sudo vim /etc/profile
export PATH=$PATH:/usr/local/
apache-tomcat-9.0.0.M13
/bin
wq!
需要强制保存退出
source /etc/profile
4.检查是否配置成功
启动Tomcatstartup.sh
Using CATALINA_BASE: /usr/local/apache-tomcat-9.0.0.M13
Using CATALINA_HOME: /usr/local/apache-tomcat-9.0.0.M13
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-9.0.0.M13/temp
Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home
Using CLASSPATH: /usr/local/apache-tomcat-9.0.0.M13/bin/bootstrap.jar:/usr/local/apache-tomcat-9.0.0.M13/bin/tomcat-juli.jar
Tomcat started.
http://localhost:8080/
ps:如果遇到权限问题(目前没有遇到)
在终端执行
sudo chmod 755 /usr/local/
apache-tomcat-9.0.0.M13
/bin/*.sh
关闭Tomcatshutdown.sh
*使用 brew安装brew install tomcat
(具体安装和配置不详述)