Archived learning notes. These archived macOS examples are for learning rather than current production installation. Java, Tomcat and DHIS2 versions must be matched. Use the official installation requirements for your selected release. Replace all example credentials before use.
3.1 Install Tomcat
Install Apache Tomcat using Homebrew:
brew install tomcat
Verify the installation:
catalina version
The output should display something like:
Server version: Apache Tomcat/9.0.71
Server built: Sep 20 2023
3.2 Set Environment Variables
Add the following to your ~/.zshrc file to set the
CATALINA_HOME environment variable:
export CATALINA_HOME
=
$(
brew --prefix
)/opt/tomcat/libexec
source ~/.zshrc
3.3 Start the Tomcat Server
To start the Tomcat server, run:
$CATALINA_HOME
/bin/startup.sh
Access the Tomcat homepage to verify the setup:
http://localhost:8080/
This confirms that the Apache Tomcat server is successfully installed and configured.