Apache is the most widely used web server software which is developed and maintained by the Apache Software Foundation. It is an open source software. Apache Tomcat is used to deploy Java Servlets and JSPs. So basically Apache is an HTTP Server, serving HTTP. Tomcat is a Servlet and JSP Server serving Java technologies.
The Mac OS X installation process is fairly painless and straight forward, but there are a few rough spots along the way. Follow these step by step instructions to get Tomcat up and running on your Mac OS X machine in no time. Configure Environment Variables Prerequisite: Java. The Servlet 4.0 specification is out and Tomcat 9.0.x does support it. Time to dive into Tomcat 9. Prerequisite: Java. Since OS X 10.7 Java is not (pre-)installed anymore, let’s fix that first. Installing Tomcat 6.0 on Linux, Mac OS X and Windows Apache Tomcat is a flexible, powerful, and widely popular application server and servlet container, which the Apache Software Foundation has developed since 1999, first under the Jakarta project, and now as its own top-level project. Users value Tomcat for its fast start-up, reliable, mature, and fully open codebase, and highly extensible.
1st Step: Go to http://tomcat.apache.org ⇒ Download ⇒ Tomcat 7.0 ⇒ 7.0.{xx}
(where {xx}
denotes the latest release) ⇒ Binary distribution ⇒ Core.
Download the “tar.gz
” package (e.g., “apache-tomcat-7.0.{xx}.tar.gz
“). Next extract the tar.gz folder to the apache-tomcat-7.0.{xx} folder. Rename the folder to “tomcat” and copy the extracted folder.
Go the Applications folder, and paste the tomcat folder.
The following files in the /Applications/tomcat/conf folder will be edited in order to configure the server.
The /Applications/tomcat/conf/server.xml file will be edited to change the port number which runs the apache tomcat server. The default port number the server runs is 8080. This can be run on the default port number if no other application is running on this port. If not you can change the port number by replacing 8080 as follows in the server.xml file (around Line 69).
You may choose any number between 1024 and 65535.
In order to enable directory listing the /Applications/tomcat/conf/web.xml file needs to be edited as follows. Change the value “false” to “true” in the parameter value under listings (around line 103).
Change the /Applications/tomcat/conf/context.xml file (around line 19) as follows. Insert the reloadable=”true” statement inside the context tag.
The configuration of the Apache Tomcat server is complete.
To start the Apache Tomcat server, open a new terminal and change the working directory as follows.
Next type the following command in order to start the server.
If you receive an error saying “command not found” or “cannot start server”, do the following to change the permissions of the catalina.sh file. This should have execute permissions for the server to start.
Next run the following command again to start the server.
Now the server should start correctly and the terminal should display a message saying “Tomcat started”.
Thank You!
7.0.{xx}
(where {xx}
denotes the latest release) ⇒ Binary distribution ⇒ Core. Download the “tar.gz
” package (e.g., “apache-tomcat-7.0.{xx}.tar.gz
“).~/Downloads
“, double-click the downloaded TAR file (e.g., “apache-tomcat-7.0.{xx}.tar.gz
“) to expand it into a folder (e.g., “apache-tomcat-7.0.{xx}
“).tar
command to expand the tarball as follow:apache-tomcat-7.0.{xx}
“) to “/Applications
“.(Notes for Advanced Users):
/usr/local
” or “/Library”.// To stop tomcat
$ sudo -u nobody ./shutdown.sh
Read this to Configure Tomcat Server
To start the Tomcat server, open a new “Terminal” (Go ⇒ Utilities ⇒ Terminal) and issue:
Check for the Tomcat server’s TCP port number from the console messages. The default is 8080.
To verify if the Tomcat server is started, start a browser (Safari or Chrome) and issue URL http://localhost:9999, suppose that Tomcat is running on the TCP port number of 9999.
To shutdown the Tomcat server, you can simply press control-c (NOT command-c) on the tomcat console, or issue command:
Looking for windows installation steps