Tomcat For Mac

admin 12/12/2021

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. As I’m writing this, Java 11.0.1 is the latest version and AdoptOpenJDK is one of the best places to find Prebuilt OpenJDK Binaries. Easy to follow details about how to install OpenJDK are available here. Anyway, after opening the Terminal app again,

hopefully shows something like this:

Installing Tomcat Here are the easy to follow steps to get it up and running on your Mac Download a binary distribution of the core module: apache-tomcat-9.0.35 from here. I picked the tar.gz in Binary Distributions / Core section. Install Tomcat on Mac OS X. Ask Question Asked 3 years, 11 months ago. Active 1 year, 10 months ago. Viewed 45k times 30. Should you want to run Tomcat, you just use the catalina run or just do catalina and it will show you all the parameters you can use with Tomcat. Apache Tomcat is a free and open source web server specially made to help you deploy and use a reliable Java platform for your web applications. A “pure Java” HTTP web server environment for your.

Download Tomcat For Mac


Whatever you do, when opening Terminal and running ‘java -version’, you should see something like this, with a version of at least 1.8.x I.e. Tomcat 9.x requires Java 8 or later.

Hello All, I have Mac book and want to run tomcat on it so please provide steps or documentation it will great help. Thanks Brajesh Patel. Tomcat › Tomcat - User. Search everywhere only in this topic Advanced Search.

sudo is a program for Unix-like operating systems, allowing you to run programs with the security privileges of another user (normally the superuser, or root). Since we are creating directories, outside of your home folder, administrator right are required. I.e., when executing sudo you will be asked to enter your password; and your Mac User account needs to be an ‘Admin’ account.

JAVA_HOME is an important environment variable, not just for Tomcat, and it’s important to get it right. Here is a trick that allows me to keep the environment variable current, even after a Java Update was installed. In ~/.bash_profile, I set the variable like so:

Installing Tomcat


Here are the easy to follow steps to get it up and running on your Mac

  1. Download a binary distribution of the core module: apache-tomcat-9.0.35 from here. I picked the tar.gz in Binary Distributions / Core section.
  2. Opening/unarchiving the archive will create a new folder structure in your Downloads folder: (btw, this free Unarchiver app is perfect for all kinds of compressed files and superior to the built-in Archive
  3. Open to Terminal app to move the unarchived distribution to /usr/local
    sudo mkdir -p /usr/local
    sudo mv ~/Downloads/apache-tomcat-9.0.35 /usr/local
  4. To make it easy to replace this release with future releases, we are going to create a symbolic link that we are going to use when referring to Tomcat (after removing the old link, you might have from installing a previous version):
    sudo rm -f /Library/Tomcat
    sudo ln -s /usr/local/apache-tomcat-9.0.35 /Library/Tomcat
  5. Change ownership of the /Library/Tomcat folder hierarchy:
    sudo chown -R <your_username> /Library/Tomcat
  6. Make all scripts executable:
    sudo chmod +x /Library/Tomcat/bin/*.sh

Tomcat 9.x

Starting and stoping Tomcat works with executing the provided scripts, like so:

Finally, after your started Tomcat, open your Mac’s Web browser and take a look at the default page: http://localhost:8080

How to Install Tomcat 7 on Mac

Step 1: Download and Install Tomcat
  1. Goto ⇒ 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 ./ // No console message
      $ sudo -u nobody ./ run // See console message

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

Step 2: Configure Tomcat Server

Read this to Configure Tomcat Server

Step 3: Start the 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.

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:


Tomcat 9 For Mac

$ cd /Applications/tomcat/bin
$ ./

Tomcat For Mac Os

Looking for windows installation steps