{"id":10,"date":"2006-04-27T16:20:45","date_gmt":"2006-04-27T21:20:45","guid":{"rendered":"http:\/\/www.onvural.net\/melih\/wordpress\/?p=5"},"modified":"2006-04-27T16:20:45","modified_gmt":"2006-04-27T21:20:45","slug":"installing-tomcat-5517-and-mod_jk-125-on-apache-13-for-mac-os-104","status":"publish","type":"post","link":"https:\/\/www.onvural.net\/melih\/thoughts\/2006\/04\/27\/installing-tomcat-5517-and-mod_jk-125-on-apache-13-for-mac-os-104\/","title":{"rendered":"Installing Tomcat 5.5.17 and Mod_Jk 1.2.5 on Apache 1.3 for Mac OS 10.4"},"content":{"rendered":"<p>I&#8217;ve seen a general lack of content on the latest versions of Tomcat and how to install it on the Mac operating system. This is really frustrating when you don&#8217;t know what you&#8217;re doing, and you just need some help. After compiling a bunch of how-tos into my memory, I decided to go ahead and post one myself that might help others out.<\/p>\n<p>The latest versions of the software involved were found at these links:<\/p>\n<ul>\n<li><a href=\"http:\/\/tomcat.apache.org\/download-55.cgi\">http:\/\/tomcat.apache.org\/download-55.cgi<\/a><\/li>\n<li><font size=\"-4\">http:\/\/www.apache.org\/dist\/tomcat\/tomcat-connectors\/jk\/binaries\/macosx\/jk-1.2.5\/<\/font><\/li>\n<\/ul>\n<p>I&#8217;ve posted <a href=\"http:\/\/www.onvural.net\/melih\/publicFolder\/apache-tomcat-5.5.17-macosx4.zip\">this<\/a> zip file which comes with all the files you will need for Tomcat including the deployer, admin-related folders, and compatibility package in case you&#8217;re still on Java 1.4<\/p>\n<p>On to the install&#8230;<\/p>\n<h2>Installing Tomcat<\/h2>\n<ol>\n<li>I&#8217;m assuming that you unzipped the zip package on your Desktop. Given that this is true, it&#8217;s probably best to move it to your \/usr\/local\/ folder, and then create a symlink to it in your Library. This is pretty simple to do.<\/li>\n<ul>\n<li>sudo cp -rf apache-tomcat-5.5.17\/ \/usr\/local\/apache-tomcat-5.5.17\/<\/li>\n<ul>\n<li><strong>Note:<\/strong> You need to know your administrator password, and either su into the terminal or use the sudo command<\/li>\n<\/ul>\n<li>ln -s \/usr\/local\/apache-tomcat-5.5.17 \/Library\/Tomcat<\/li>\n<ul>\n<li>This creates a symlink to which you can point any version of Tomcat as newer versions are released, or older versions need to be tested<\/li>\n<\/ul>\n<\/ul>\n<li>Next let&#8217;s go ahead and setup your bash environment<\/li>\n<ul>\n<li>Head to your home directory and enter the following lines into a .bash_profile file<\/li>\n<ul>\n<li>export JAVA_HOME=\/System\/Library\/Frameworks\/JavaVM.framework\/<br \/>\nVersions\/CurrentJDK\/Home<\/li>\n<li>export CATALINA_HOME=\/Library\/Tomcat<\/li>\n<\/ul>\n<\/ul>\n<li>The environment is setup. Now we need to setup the start and stop files for Tomcat. This is borrowed from Apple&#8217;s how-to on <a href=\"http:\/\/developer.apple.com\/internet\/java\/tomcat1.html\">setting up Tomcat.<br \/>\n<\/a> It&#8217;s suggested to go ahead and setup a bin folder in your home directory, and I did this because it starts organizing your scripts. The content of the files should look like this:<\/li>\n<ul>\n<li>startup.sh<\/li>\n<ul>\n<li>#!\/bin\/sh<\/li>\n<li>$CATALINA_HOME\/bin\/startup.sh<\/li>\n<\/ul>\n<li>shutdown.sh<\/li>\n<ul>\n<li>#!\/bin\/sh<\/li>\n<li>$CATALINA_HOME\/bin\/shutdown.sh<\/li>\n<\/ul>\n<li>Then execute the following command<\/li>\n<ul>\n<li>chmod ug+x start_tomcat stop_tomcat<\/li>\n<\/ul>\n<\/ul>\n<li>If everything has been configured correctly, then you can go ahead and go to http:\/\/localhost:8080 and see a running instance of Tomcat. Congratulations!<\/li>\n<\/ol>\n<h2>Configuring Mod_JK<\/h2>\n<p>So, it turns out that I was making this way too difficult. It is in fact quite simple to get mod_jk working on your computer. You do need some knowledge of how Apache works, and enough permissions to set some things ups on your computer, but I&#8217;m sure you already have that if you&#8217;re reading this tutorial. On with the installation:<\/p>\n<ol>\n<li>Move the mod_jk.so file that you should have downloaded as a binary into the appropriate folder with the following command:\n<ul>\n<li>sudo cp {CURRENT_PATH_TO_MOD_JK.SO}\/mod_jk.so \/usr\/libexec\/httpd\/mod_jk.so<\/li>\n<\/ul>\n<\/li>\n<li>To setup the workers.properties file, take the following steps:\n<ul>\n<li>cd $CATALINA_HOME\/conf<\/li>\n<li>sudo touch workers.properties<\/li>\n<li>sudo vi workers.properties<\/li>\n<li>Type in the following to setup the workers.properties file<\/li>\n<ul>\n<li>worker.list={any_username}<\/li>\n<li>worker.{any_username}.type=ajp13<\/li>\n<li>worker.{any_username}.host={HOSTNAME_OF_SERVER}<\/li>\n<li>worker.{any_username}.port=8009<\/li>\n<\/ul>\n<li>Mine looks like this:<\/li>\n<ul>\n<li>worker.list=tomcat<\/li>\n<li>worker.tomcat.type=ajp13<\/li>\n<li>worker.tomcat.host=localhost<\/li>\n<li>worker.tomcat.port=8009<\/li>\n<\/ul>\n<\/ul>\n<\/li>\n<li>Now let&#8217;s move on to setup the Apache HTTP server. Move to the Apache configuration directory to update httpd.conf.\n<ul>\n<li>cd \/etc\/httpd<\/li>\n<li>sudo vi httpd.conf<\/li>\n<\/ul>\n<\/li>\n<li>And now let&#8217;s add the following lines to the httpd.conf file<\/li>\n<ul>\n<li>LoadModule jk_module libexec\/mod_jk.so<\/li>\n<li>AddModule mod_jk.c<\/li>\n<li>JkWorkersFile {CATALINA_HOME}\/conf\/workers.properties<\/li>\n<li>JkLogFile {CATALINA_HOME}\/logs\/mod_jk.log<\/li>\n<li>JkLogLevel error<\/li>\n<\/ul>\n<\/li>\n<li>Now let&#8217;s add the VirtualHost necessary to mount the paths. Type the following into your httpd.conf file\n<ul>\n<li>&lt;VirtualHost {HOSTNAME_IN_WORKERS_FILE}&gt;<\/li>\n<li>DocumentRoot {DIRECTORY_YOUR_HTML_FILES_ARE_IN}<\/li>\n<li>JkMount \/{webapp_name}\/* {any_username}<\/li>\n<li>JkMount \/{webapp_name} {any_username}<\/li>\n<li>&lt;\/VirtualHost&gt;<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>There you go, now you should be able to restart Apache and have Tomcat working through Apache serving both your dynamic and static content.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve seen a general lack of content on the latest versions of Tomcat and how to install it on the Mac operating system. This is really frustrating when you don&#8217;t know what you&#8217;re doing, and you just need some help. After compiling a bunch of how-tos into my memory, I decided to go ahead and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[2,1],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pQyAq-a","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":81,"url":"https:\/\/www.onvural.net\/melih\/thoughts\/2007\/12\/27\/installing-dbdmysql-on-os-x-10411\/","url_meta":{"origin":10,"position":0},"title":"Installing DBD::mysql on OS X (10.4.11)","date":"December 27, 2007","format":false,"excerpt":"I was trying to get Bugzilla installed to act as my task manager on my local machine. It's a new project that I'm trying out as part of my New Year's Resolution of spending two hours everyday on a project of my own choice. It will help me to be\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14,"url":"https:\/\/www.onvural.net\/melih\/thoughts\/2006\/06\/19\/week-3-san-jose-yosemite-trip\/","url_meta":{"origin":10,"position":1},"title":"Week 3 - San Jose - Yosemite Trip","date":"June 19, 2006","format":false,"excerpt":"This was a good week for us at work. We've built a prototype which is going to get showed off at the IHE Workshop in Chicago. I guess that means we're officially a big deal. Our mentor is really excited with the work we've done. I think we've taken something\u2026","rel":"","context":"In &quot;Extreme Blue Internship&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":68,"url":"https:\/\/www.onvural.net\/melih\/thoughts\/2007\/09\/17\/to-install-openldap-on-mac-os-x\/","url_meta":{"origin":10,"position":2},"title":"To Configure OpenLDAP on MAC OS X","date":"September 17, 2007","format":false,"excerpt":"So it turns out that to install my development environment for Zimbra that I had to install OpenLDAP. The problem is that on Mac OS X the version of the Berkeley DB that comes installed isn't high enough for the current version of OpenLDAP. As a result, I had to\u2026","rel":"","context":"In &quot;Summer of Zimbra&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":992,"url":"https:\/\/www.onvural.net\/melih\/thoughts\/2014\/03\/10\/my-coach-mac-story\/","url_meta":{"origin":10,"position":3},"title":"My Coach Mac story","date":"March 10, 2014","format":false,"excerpt":"A teacher at Cary Academy passed away this weekend. His name was Dave McAllister. I knew him as an athletic trainer, gym teacher, NC State fan, and a great conversationalist. He gave us shit all of the time because he cared. He always did right by the person first. And\u2026","rel":"","context":"In &quot;just thinking out loud&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":83,"url":"https:\/\/www.onvural.net\/melih\/thoughts\/2008\/01\/29\/well-darn\/","url_meta":{"origin":10,"position":4},"title":"Well darn...","date":"January 29, 2008","format":false,"excerpt":"And then the whole issue is resolved... All I had to do was wait for Bugzilla 3.0.3 (I installed 3.0.2), and the whole issue with the DBI package would have been resolved. Now isn't that a stinker.","rel":"","context":"In &quot;just thinking out loud&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.onvural.net\/melih\/thoughts\/wp-json\/wp\/v2\/posts\/10"}],"collection":[{"href":"https:\/\/www.onvural.net\/melih\/thoughts\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.onvural.net\/melih\/thoughts\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.onvural.net\/melih\/thoughts\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.onvural.net\/melih\/thoughts\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":0,"href":"https:\/\/www.onvural.net\/melih\/thoughts\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.onvural.net\/melih\/thoughts\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.onvural.net\/melih\/thoughts\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.onvural.net\/melih\/thoughts\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}