mac下通过Homebrew安装tomcat

首先保证brew命令能够正常使用;

1. 搜索tomcat是否存在:

brew search tomcat

2. 安装tomcat:

brew install tomcat

3. 检查是否安装成功:

catalina -h

4. 运行tomcat:

catalina run

Tomcat的默认端口是8080,如果运行成功可通过http://localhost:8080访问
webapp的根目录(CATALINA_HOME)为:/usr/local/Cellar/tomcat/7.0.33/libexec/webapps/ROOT/

mac下通过Homebrew安装tomcat》上有1条评论

  1. 小木同 文章作者

    如出现如下错误

    touch: /usr/local/Cellar/tomcat/7.0.34/libexec/logs/catalina.out: No such file or directory
    .//catalina: line 389: /usr/local/Cellar/tomcat/7.0.34/libexec/logs/catalina.out: No such file or directory

    要手动创建/usr/local/Cellar/tomcat/7.0.34/libexec/logs/目录即可正常运行

发表评论

电子邮件地址不会被公开。 必填项已用*标注