1. Tomcat For Mac Os X
  2. Tomcat Download Mac

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.

Tomcat For Mac Os X

Install Apache Tomcat 7 server

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.

Configure the Apache Tomcat server

The following files in the /Applications/tomcat/conf folder will be edited in order to configure the server.

  • web.xml
  • context.xml
  • server.xml

Set the TCP Port number

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).

Tomcat

You may choose any number between 1024 and 65535.

Enabling Directory listing

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).

Enabling Automatic Reload

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.

Start the Apache Tomcat server

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.

Tomcat

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!

How to Install Tomcat 7 on Mac

Step 1: Download and Install Tomcat
  1. Goto 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“).
    • Goto “~/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}“).
      (Notes for Advanced Users)
      Alternatively, you can use the tar command to expand the tarball as follow:
      $ cd ~/Downloads
      $ tar xvf apache-tomcat-7.0.{xx}.tar.gz
    • Move the extracted folder (e.g., “apache-tomcat-7.0.{xx}“) to “/Applications“.
    • Rename the folder “tomcat”, for ease of use.
  2. (Notes for Advanced Users):

    • It is probably better to keep the tomcat in “/usr/local” or “/Library”.
    • Instead of renaming the tomcat’s folder, it it better to create a symlink called tomcat as follows:
      $ cd /Applications
      $ sudo ln -s apache-tomcat-7.0.{xx} tomcat
    • For security reason, you should not run Tomcat as root user. Instead, assign Tomat to user nobody (of group nobody):
      $ sudo chown -R nobody:nobody /Applications/tomcat
      // -R: recursive thru sub-directories
      // {user}:{group}


      // To start tomcat as user nobody

      $ cd /Applications/tomcat/bin
      $ sudo -u nobody ./startup.sh // No console message
      $ sudo -u nobody ./catalina.sh run // See console message

      // To stop tomcat
      $ sudo -u nobody ./shutdown.sh

Step 2: Configure Tomcat Server

Read this to Configure Tomcat Server

Step 3: Start the Tomcat Server
Tomcat 7 installation for mac os

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.

Step 4: Shutdown the Tomcat Server

To shutdown the Tomcat server, you can simply press control-c (NOT command-c) on the tomcat console, or issue command:

$ cd /Applications/tomcat/bin
$ ./shutdown.sh

Tomcat Download Mac

For


Looking for windows installation steps