1.下载tomcat,解压缩
macdeMacBook-Pro:tomca8 mac$ pwd
/Users/mac/dev/tomca8
2.设置环境变量
- 编辑文件
vi ~/.bash_profile
- 编辑内容
TOMCAT_PATH=/Users/mac/dev/tomca8
PATH=$TOMCAT_PATH/bin:$JAVA_HOME/bin:$M3_HOME/bin:$PATH:.
3.启动tomcat
startup.sh
如果出现无权访问
macdeMacBook-Pro:tomca8 mac$ startup.sh
-bash: /Users/mac/dev/tomca8/bin/startup.sh: Permission denied
执行命令
sudo chmod 755 /Users/mac/dev/tomca8/bin/*.sh
关闭tomcat
shutdown.sh
sudo chmod命令需要mac用户不能密码为空
网友评论