{"id":1764,"date":"2013-12-03T08:40:03","date_gmt":"2013-12-03T08:40:03","guid":{"rendered":"http:\/\/blog.designed79.co.uk\/?p=1764"},"modified":"2013-12-03T08:40:19","modified_gmt":"2013-12-03T08:40:19","slug":"installing-tomcat-7-0-x-on-os-x","status":"publish","type":"post","link":"https:\/\/blog.designed79.co.uk\/?p=1764","title":{"rendered":"Installing Tomcat 7 On Mac OS X"},"content":{"rendered":"<p>Tomcat 7 is the first Apache Tomcat release to support the Servlet 3.0, JSP 2.2, and EL 2.2 specifications. Please note that Tomcat 7 requires Java 1.6 or better, but that shouldn\u2019t be a problem, if you are running OS X 10.5 or 10.6.<\/p>\n<p>On OS X 10.7 and 10.8 (Mnt Lion) however, Java is initially not installed anymore. The easiest way to get Java onto your Mac is probably to open the Terminal app and enter java. You will be asked if you want to install it and OS X takes care of the rest \u2013 you would end up with Java 6, or you could install Java 7 directly from\u00a0<a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html\" target=\"_blank\">Oracle<\/a>.<\/p>\n<p>Whatever you do, when opening Terminal and running\u00a0<strong>java -version<\/strong>, you should see something like this:<\/p>\n<pre>java version \"1.6.0_37\"\r\nJava(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)\r\nJava HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)<\/pre>\n<p>or this:<\/p>\n<pre>java version \"1.7.0_25\"\r\nJava(TM) SE Runtime Environment (build 1.7.0_25-b15)\r\nJava HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)\r\nHere are the easy to follow steps to get it up and running on your Mac<\/pre>\n<p>&nbsp;<\/p>\n<ol>\n<li>Download a binary distribution of the core module: apache-tomcat-7.0.42.tar.gz from\u00a0<a title=\"Apache Tomcat Download Page\" href=\"http:\/\/tomcat.apache.org\/download-70.cgi\" target=\"_blank\">here<\/a>. I picked the tar.gz in Binary Distributions \/ Core section.<\/li>\n<li>Opening\/unarchiving the archive will create a folder structure in your\u00a0<em>Downloads<\/em>folder: (btw, this free\u00a0<a title=\" The Unarchiver\" href=\"https:\/\/itunes.apple.com\/us\/app\/the-unarchiver\/id425424353?mt=12\" target=\"_blank\">Unarchiver app<\/a>\u00a0is perfect for all kinds of compressed files and superior to the built-in Archive Utility.app)<br \/>\n~\/Downloads\/apache-tomcat-7.0.42<\/li>\n<li>Open to Terminal app to move the unarchived distribution to \/usr\/local\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">sudo mkdir -p \/usr\/local<\/div><\/div>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">sudo mv ~\/Downloads\/apache-tomcat-7.0.42 \/usr\/local<\/div><\/div>\n<\/li>\n<li>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):\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">sudo rm -f \/Library\/Tomcat<br \/>\nsudo ln -s \/usr\/local\/apache-tomcat-7.0.42 \/Library\/Tomcat<\/div><\/div>\n<\/li>\n<li>Change ownership of the \/Library\/Tomcat folder hierarchy:\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">sudo chown -R &amp;lt;your_username&amp;gt; \/Library\/Tomcat<\/div><\/div>\n<\/li>\n<li>Make all scripts executable:\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">sudo chmod +x \/Library\/Tomcat\/bin\/*.sh<\/div><\/div>\n<\/li>\n<\/ol>\n<p>Instead of using the start and stop scripts, like so:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">Last login: Sun Aug 14 15:20:38 on ttys000<br \/>\nwpbookpro:~ wolf$\u00a0&lt;strong&gt;\/Library\/Tomcat\/bin\/startup.sh&lt;\/strong&gt;<br \/>\nUsing CATALINA_BASE: \/Library\/Tomcat<br \/>\nUsing CATALINA_HOME: \/Library\/Tomcat<br \/>\nUsing CATALINA_TMPDIR: \/Library\/Tomcat\/temp<br \/>\nUsing JRE_HOME: \/Library\/Java\/Home<br \/>\nUsing CLASSPATH: \/Library\/Tomcat\/bin\/bootstrap.jar:\/Library\/Tomcat\/bin\/tomcat-juli.jar<br \/>\nwpbookpro:~ wolf$\u00a0&lt;strong&gt;\/Library\/Tomcat\/bin\/shutdown.sh&lt;\/strong&gt;<br \/>\nUsing CATALINA_BASE: \/Library\/Tomcat<br \/>\nUsing CATALINA_HOME: \/Library\/Tomcat<br \/>\nUsing CATALINA_TMPDIR: \/Library\/Tomcat\/temp<br \/>\nUsing JRE_HOME: \/Library\/Java\/Home<br \/>\nUsing CLASSPATH: \/Library\/Tomcat\/bin\/bootstrap.jar:\/Library\/Tomcat\/bin\/tomcat-juli.jar<br \/>\nwpbookpro:~ wolf$<\/div><\/div>\n<p>you may also want to check out Activata\u2019s\u00a0<a title=\"Tomcat Controller\" href=\"http:\/\/www.activata.co.uk\/downloads\/\" target=\"_blank\">Tomcat Controller<\/a>\u00a0a tiny freeware app, providing a UI to quickly start\/stop Tomcat. It may not say so, but Tomcat Controller works in OS X 10.8.x just fine.<\/p>\n<p>Finally, after your started Tomcat, open your Mac\u2019s Web browser and take a look at the default page:\u00a0<a href=\"http:\/\/localhost:8080\/\" target=\"_blank\">http:\/\/localhost:8080<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tomcat 7 is the first Apache Tomcat release to support the Servlet 3.0, JSP 2.2, and EL 2.2 specifications. Please note that [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1764","post","type-post","status-publish","format-standard","hentry","category-info-on-tech"],"_links":{"self":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1764","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1764"}],"version-history":[{"count":0,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1764\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1764"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}