This article describes how to download and run the Apache Tomcat server as a standalone server. These instructions are applicable for Mac and Linux environments.
1. Download the Tomcat server from the Apache Tomcat website.
2. Extract the Tomcat server to a folder where you intend it to deploy. This tutorial uses ApacheTomcat folder to contain the Tomcat folder. The path is
3. To run the server, navigate to
and run
If your environment has no
The operation couldn't be completed. Unable to locate a Java Runtime.
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
That means you don't have the
1. Run which java to find the Java installation path in your system
In my system, which java returns
2. Set the JAVA_HOME by running
3. Confirm the setting by running echo $JAVA_HOME
4.Now go to
You should be able to access the Tomcat home page using http://localhost:8080
Go to
The server runs on the default port 8080. To change that
1. Go to
2. Edit server.xml
Locate
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
3. Re-start the server