-
Notifications
You must be signed in to change notification settings - Fork 9
Installing Apache Tomcat using Homebrew on OS X Yosemite
Assuming that Homebrew is already installed/setup.
Run daily boilerplate commands:
$ brew update
$ brew upgrade
$ brew doctorNext, install Tomcat:
$ brew install tomcatReload your profile:
$ source ~/bash_profileStart or stop Tomcat:
$ catalina start
$ catalina stopIf you don't get any error messages, visit http://localhost:8080 and you should be good to go.
If you see:
Unable to find any JVMs matching version "(null)". No Java runtime present, try --request to install. Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program
… then run:
$ java -version
No Java runtime present, requesting install.Don't click anything. Based on Apple's instructions, they suggest you visit:
… and download/install Java. I only point this out because the $ java -version command takes you to a different URL; I'm sure they are the same, but I'll follow Apple's URLs just because I'll know who to blame if shit hits the fan. 😉
Add this to your .bash_profile:
export JAVA_HOME='/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home'Reload your profile (or, restart computer):
$ source ~/.bash_profileNow, if you reload your shell and run:
$ java -version… you'll get the same message, but Tomcat should run now:
$ catalina startView available commands:
$ catalina -h