How to Install and Configure Tomcat on Mac OS

Installing and Running tomcat on MAC OS is very simple and straight forward. Before we begin we need to ensure that Java is installed on our mac.  To check for Java installation, open terminal and execute java command. If Java is installed it will display the help else it will display command not found. Java can be downloaded from Once the Java is installed, download the apache tomcat from site, download zip or tar.gz file. Select appropriate vereion, according to jdk / jre version of your system. If any confusion visit for selecting correct version of Apache tomcat. Following are simple steps :

Extract the downloaded zip or tar.gz file.
Extracted folder will show following content
Tomcat Extracted folder in Mac OS

Open tomcat-users.xml file from conf folder in editor. Add following lines
<role rolename="manager-gui"/>
<role rolename="admin-gui" />
<user username="admin" password="admin" roles="manger-gui,admin-gui" />
Save and Close the file.

Tomcat UserConfig File

 Now its time to start the tomcat server. Open terminal, navigate to bin directory and run following command [To make all scripts executable ]
chmod +x *.sh
Now execute sh to start the server [ Shown below ]. It will show a message Tomcat Started.
execute sh to start the Tomcat server on Mac OS

 Open browser [ safari / firefox / chrome ], open localhost:8080
open localhost:8080

Now click on Manager App button on right side which will ask for username and password. Enter admin as username and admin as password [ We configured the same in tomcat-users.xml] and press ok.
Tomcat Manager App

You can see all the application and there respective states. 
Tomcat Manager App - Applications

Labels: , , ,