MacOS - Setup Tomcat
29 Mar 2017
This is extremely easy:
- Download and install JDK.
- Download Tomcat binaries from the official site.
- Unpack archive into your home folder i.e:
~/apache-tomcat-8.5.12
-
Set
CATALINA_HOME
variable:Add to ~/.bash_profile
export CATALINA_HOME=~/apache-tomcat-8.5.12
-
Set
JAVA_HOME
variable:Add to ~/.bash_profile
export JAVA_HOME=$(/usr/libexec/java_home)
-
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/