Install Apache Tomcat using Homebrew:
brew install tomcatVerify the installation:
catalina version
The output should display something like:
Server version: Apache Tomcat/9.0.71
Server built: Sep 20 2023
Add the following to your ~/.zshrc file to set the
CATALINA_HOME environment variable:
export CATALINA_HOME=$(brew --prefix)/opt/tomcat/libexec
source ~/.zshrcTo start the Tomcat server, run:
$CATALINA_HOME/bin/startup.shAccess the Tomcat homepage to verify the setup:
http://localhost:8080/
This confirms that the Apache Tomcat server is successfully installed and configured.