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 http://www.oracle.com/technetwork/java/javase/downloads/index.html
Once the Java is installed, download the apache tomcat from
http://tomcat.apache.org site, download zip or tar.gz file. Select appropriate vereion, according to
jdk / jre version of your system. If any confusion visit http://tomcat.apache.org/whichversion.html 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
Open tomcat-users.xml file from conf folder in editor. Add following lines
<role rolename="admin-gui" />
<user username="admin" password="admin" roles="manger-gui,admin-gui" />
Save and Close the 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 startup.sh to start the server [ Shown below ]. It will show a message Tomcat Started.
Open browser [ safari / firefox / chrome ], 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.
You can see all the application and there respective states.
Labels: Java, JEE, MacOS, Tomcat