MAC Tomcat 配置

1,去Apache 官网下载 zip(pgp,md5,sha1)解压版

2 ,把下载好的Tomcat 解压,然后把包名改成Tomcat,

3,把这个包复制到/usr/local 文件下,(还有一种方法,把Tomcat的bin目录配置到.zshrc或者是.bash_podfile中,这样可以全局使用startup.sh)

4,测试开启  

localhost:~ chao$ /usr/local/Tomcat/bin/startup.sh

-bash: /usr/local/Tomcat/bin/startup.sh: Permission denied

没有权限,所以要打开权限

在输入:

localhost:~ chao$ sudo chmod 755 /usr/local/Tomcat/bin/*.sh

需要输入密码

5,如果sudo sh startup.sh  不行,那么直接执行绝对目录

localhost:~ chao$ sudo sh startup.sh

sh: startup.sh: No such file or directory

localhost:~ chao$ /usr/local/Tomcat/bin/startup.sh

6,最后成功

Using CATALINA_BASE:   /usr/local/Tomcat

Using CATALINA_HOME:   /usr/local/Tomcat

Using CATALINA_TMPDIR: /usr/local/Tomcat/temp

Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home

Using CLASSPATH:       /usr/local/Tomcat/bin/bootstrap.jar:/usr/local/Tomcat/bin/tomcat-juli.jar

Tomcat started.

注意,在eclipse 上部署 tomcat 填写的路径是 /Library/tomcat,那么该操作可能要把 /usr/local/tomcat 换成      /Library/tomcat  在来一遍了啊

相关推荐
©️2020 CSDN 皮肤主题: 像素格子 设计师:CSDN官方博客 返回首页