MacOS - Setup Tomcat

29 Mar 2017

This is extremely easy:

  1. Download and install JDK.
  2. Download Tomcat binaries from the official site.
  3. Unpack archive into your home folder i.e: ~/apache-tomcat-8.5.12
  4. Set CATALINA_HOME variable:

    Add to ~/.bash_profile export CATALINA_HOME=~/apache-tomcat-8.5.12

  5. Set JAVA_HOME variable:

    Add to ~/.bash_profile export JAVA_HOME=$(/usr/libexec/java_home)

  6. Reload current shell (or create new shell session):

    source ~/.bash_profile

Rest of actions is optional.


To start Tomcat run ./startup.sh

To stop Tomcat run ./shutdown.sh

If scripts do not start add permission for execute: chmod +x <filename>

After startup, you can access running web app at http://localhost:8080/