Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@colbyr
Created March 22, 2012 03:34
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save colbyr/2155434 to your computer and use it in GitHub Desktop.
Save colbyr/2155434 to your computer and use it in GitHub Desktop.
Install Tomcat 6 with Homebrew
cd /usr/local/Library/Formula
git checkout 9e18876 tomcat.rb
brew install tomcat
@anny-goerl
Copy link

Awesome. Works like a charm!

@tyrannasaurusbanks
Copy link

+1

@urmimajumdar-taulia
Copy link

Thank you :) +2

@theothermattm
Copy link

Thanks! I noticed there's a tomcat6 formula now but it points to the wrong download URL's. Bummer!

@oravecz
Copy link

oravecz commented Feb 20, 2014

I think the Tomcat mirrors are broken. I added the following url directly to my formula to bypass the mirrors.

require 'formula'

class Tomcat6 < Formula
  homepage 'http://tomcat.apache.org/'
  url 'http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.37/bin/apache-tomcat-6.0.37.tar.gz'
  sha1 '722e6e4f35983b28170002d6b89b4915db682db6'

  keg_only "Some scripts that are installed conflict with other software."

  def install
    rm_rf Dir['bin/*.{cmd,bat]}']
    libexec.install Dir['*']
    (libexec+'logs').mkpath
    bin.mkpath
    Dir["#{libexec}/bin/*.sh"].each { |f| ln_s f, bin }
  end

  def caveats; <<-EOS.undent
    Some of the support scripts used by Tomcat have very generic names.
    These are likely to conflict with support scripts used by other Java-based
    server software.

    You can link Tomcat into PATH with:

      brew link tomcat6

    or add #{bin} to your PATH instead.
    EOS
  end
end

@chestnutchen
Copy link

Thanks

@amirnissim
Copy link

brew install homebrew/versions/tomcat6

@BK-Choi
Copy link

BK-Choi commented Nov 18, 2017

homebrew command changed
brew install tomcat@6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment