Installing Tomcat 7.0.x on OS X in 12 Seconds!



Yes, you read that right. I installed the newest version of Tomcat in just 12 seconds. Look, no hands:

$ brew install tomcat

that’s it. it even puts in a symlink for me so I can start the server just like: $ catalina start

Well, how did I do that? If you have heard of Homebrew this is probably old news. Homebrew is the best Mac OS X installation package. Give it a try by following the install instruction here.

After you’ve used brew install a bit, you might wonder, how did the magic happen?

The magic is a bunch of installation instructions (called formulae) stored in an internet repository, github Because homebrew is an open source project, a lot people keep these formulae current, and if one formula needs modification for a newer version of a released software, anyone can probably do it and submit the code to github so that the next person will benefit from the update. Take a look at what made the above tomcat install happen so easily in the tomcat.rb file from the above link:

require 'formula'

class Tomcat < Formula homepage '' url '' md5 '00d310f2f4e15821951e9d206af45c6b' skip_clean :all def install # Remove Windows scripts rm_rf Dir['bin/*.bat'] # Install files prefix.install %w{ NOTICE LICENSE RELEASE-NOTES RUNNING.txt } libexec.install Dir['*'] bin.install_symlink "#{libexec}/bin/" => "catalina"

Even if you are no Ruby developer, you can probably figure out the above code without any trouble.

Intrigued? Now try installing mysql. Yes, indeed:

$ brew install mysql