
Installing Apache Tomcat 7.0.x on OS X
I had to install Apache Tomcat recently for a project that I was working on and found a lack of clarity with the instructions that where provided. So I end up founding this article for Wolf Paulus to be a very easy to follow and a helpful set of instructions for properly installing Apache Tomcat on my Mac.
So I thought I would share it:
- Download a binary distribution of the core module: apache-tomcat-7.0.33.tar.gz from here. I picked the tar.gz in Binary Distributions / Core section.
- Opening/unarchiving the archive will create a folder structure in your Downloads folder:
~/Downloads/apache-tomcat-7.0.33
- Move the unarchived distribution to /usr/local
sudo mkdir -p /usr/local
sudo mv ~/Downloads/apache-tomcat-7.0.33 /usr/local
- 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-7.0.33 /Library/Tomcat
- Change ownership of the /Library/Tomcat folder hierarchy:
sudo chown -R <your_username> /Library/Tomcat
- Make all scripts executable:
sudo chmod +x /Library/Tomcat/bin/*.sh
Side note: Instead of using the start and stop scripts, like so:
/Library/Tomcat/bin/startup.sh
Using CATALINA_BASE: /Library/Tomcat
Using CATALINA_HOME: /Library/Tomcat
Using CATALINA_TMPDIR: /Library/Tomcat/temp
Using JRE_HOME: /Library/Java/Home
Using CLASSPATH: /Library/Tomcat/bin/bootstrap.jar:/Library/Tomcat/bin/tomcat-juli.jar
/Library/Tomcat/bin/shutdown.sh
Using CATALINA_BASE: /Library/Tomcat
Using CATALINA_HOME: /Library/Tomcat
Using CATALINA_TMPDIR: /Library/Tomcat/temp
Using JRE_HOME: /Library/Java/Home
Using CLASSPATH: /Library/Tomcat/bin/bootstrap.jar:/Library/Tomcat/bin/tomcat-juli.jar
you may also want to check out Activata’s Tomcat Controller a tiny freeware app, providing a UI to quickly start/stop Tomcat.
Finally, after your started Tomcat, open your browser and take a look at the default page: http://localhost:8080.
Pretty straight forawrd isn’t it!!
It’s also worth checking out Wolf Paulus‘s post and website as he give a bit more extra lit’ tidbits.
Hope this was helpful!