<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3598645319121131665</id><updated>2011-07-07T17:32:31.914-04:00</updated><category term='Change Directory'/><category term='Tomcat'/><category term='Apache'/><category term='Port 80'/><category term='Install'/><category term='Variables'/><category term='Daemon'/><category term='Pipes'/><title type='text'>Your Answer is in Another Blog</title><subtitle type='html'>Posting answers I couldn't find anywhere else, or consolidating those that are scattered.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://yaiiab.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3598645319121131665/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://yaiiab.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dan Helm</name><uri>http://www.blogger.com/profile/01677629886161618458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_OnVrm-y6u6E/St9u8klw7lI/AAAAAAAAAAM/xB95_UcplD4/S220/rickastley.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3598645319121131665.post-5984272530395948019</id><published>2009-10-27T14:30:00.001-04:00</published><updated>2009-10-27T14:31:12.255-04:00</updated><title type='text'>Virtualization VGA Driver Passthrough</title><content type='html'>&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Mr. Teo En Ming has posted a few blog entries on how to pass the host video driver through Xen to a virtual guest. This allows for 3D gaming in a guest environment, as well as other productive uses.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://teo-en-ming-aka-zhang-enming.blogspot.com/2009/10/xen-virtualization-intel-vt-d-direct.html"&gt;http://teo-en-ming-aka-zhang-enming.blogspot.com/2009/10/xen-virtualization-intel-vt-d-direct.html&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://teo-en-ming-aka-zhang-enming.blogspot.com/2009/10/xen-virtualization-intel-vt-d-direct.html"&gt;http://teo-en-ming-aka-zhang-enming.blogspot.com/2009/10/more-xen-virtualization-vga-passthrough_26.html&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3598645319121131665-5984272530395948019?l=yaiiab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yaiiab.blogspot.com/feeds/5984272530395948019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yaiiab.blogspot.com/2009/10/virtualization-vga-driver-passthrough.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3598645319121131665/posts/default/5984272530395948019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3598645319121131665/posts/default/5984272530395948019'/><link rel='alternate' type='text/html' href='http://yaiiab.blogspot.com/2009/10/virtualization-vga-driver-passthrough.html' title='Virtualization VGA Driver Passthrough'/><author><name>Dan Helm</name><uri>http://www.blogger.com/profile/01677629886161618458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_OnVrm-y6u6E/St9u8klw7lI/AAAAAAAAAAM/xB95_UcplD4/S220/rickastley.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3598645319121131665.post-2572476311392722061</id><published>2009-10-21T21:56:00.002-04:00</published><updated>2009-10-22T10:00:28.891-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pipes'/><category scheme='http://www.blogger.com/atom/ns#' term='Variables'/><category scheme='http://www.blogger.com/atom/ns#' term='Change Directory'/><title type='text'>Shortcut: Pipe Your Output and Change Directory</title><content type='html'>&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Objective: &lt;/b&gt;Piping your output into the "cd" command can have many uses. I want a Google "I'm Feeling Lucky" option when locating files on my filesystem, thus saving me the time and energy of typing out a long path once I've found it's location.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Script:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: #660000; font-size: small;"&gt;# cd $( dirname $( locate &lt;i&gt;type.in.search.value.here&lt;/i&gt; | head -n 1 ))&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;How it works:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: #660000; font-size: small;"&gt;Let's work from the inside out.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: #660000; font-size: small;"&gt;The "head" command by default prints &lt;/span&gt;&lt;span style="color: black; font-size: small;"&gt;the first 10 lines of a file.&lt;span style="color: #660000;"&gt; # head messages&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;With the -n switch we can decide exactly how many lines we want to print to the standard output or in this case, a variable. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;The "locate" command is my current favorite search tool in Linux, just don't forget to use &lt;span style="color: #660000;"&gt;# updatedb&lt;span style="color: black;"&gt; to update your directory database so that this command works properly.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;Typically, if I run &lt;span style="color: #660000;"&gt;# locate daniel&lt;/span&gt;&amp;nbsp; I'd see /home/daniel plus every file in that directory on my terminal. When we pipe the output of &lt;span style="color: #660000;"&gt;#locate daniel&lt;/span&gt; to &lt;span style="color: #660000;"&gt;# head -n 1 &lt;span style="color: black;"&gt;then the output is only the first result.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;The markings &lt;span style="color: #660000;"&gt;$(&amp;nbsp;&amp;nbsp; ) &lt;span style="color: black;"&gt;take what ever is inside the parenthesis and create somewhat of a temporary variable. This allows for a different kind of pipe. At the root try this &lt;span style="color: #660000;"&gt;# echo home | cd&lt;/span&gt; . Now, try this,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt;# cd $( echo home )&lt;/span&gt; . Similar way of piping commands, but sometimes it's better to use one than the other.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;The "dirname" command outputs whatever is behind the leading / of a path. &lt;span style="color: #660000;"&gt;# dirname /home/daniel&lt;/span&gt; would out put /home and &lt;span style="color: #660000;"&gt;# dirname /home/daniel/temp.txt&lt;/span&gt; would output /home/daniel. Because you can't change directory to a file name, this allows us to go to the containing folder for the file we are searching for. So we pipe the results of the dirname to cd, which takes us to our destination.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;That's a lot of typing, and in most cases it would be quicker to just type the path while hitting tab a couple times to complete long folder names. We can this as a function to your BASH profile, that is if BASH is your shell. BASH is all I know, but I'd love to post instructions for other shells if you got them.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;Open up /home/$user/.bashrc&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt;# vi /home/daniel/.bashrc&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Adding a function is easy by typing&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt; &lt;/span&gt;&lt;span style="color: #660000;"&gt;function &lt;i&gt;name.of.function&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #660000;"&gt;}&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="color: #660000;"&gt;&lt;span style="color: black;"&gt;Insert your code between the brackets, with one difference&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #660000; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;function gimmie&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #660000; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;{ # cd $( dirname $( locate $1 | head -n 1 )) }&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;div style="color: black;"&gt;&lt;span style="font-size: small;"&gt;In BASH, the variable $1 is the value of first command line parameter, with $2 being the second and so on. This variable accepts whatever command parameter we pass to it.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #660000;"&gt;&lt;span style="font-size: small;"&gt;# gimmie temp.txt&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="font-size: small;"&gt;temp.txt will get passed to $1, locate will find its location, head will take the first result being &lt;/span&gt;&lt;span style="font-size: small;"&gt;/home/daniel/temp.txt, dirname will strip away the filename temp.txt and cd will change our present working directory to /home/daniel&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif; text-align: left;"&gt;&lt;pre&gt;&lt;span style="color: black; font-family: Verdana,sans-serif; font-size: small;"&gt;&lt;b&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Credits: &lt;/span&gt;&lt;/b&gt;Thanks for helping me come up with this script. &lt;br /&gt;LinuxQuestions.org members:&lt;br /&gt;GrapefruiTgirl, PTrenholme, :::, catkin, Tinkster, pixellany  &lt;/span&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="color: #660000;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3598645319121131665-2572476311392722061?l=yaiiab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yaiiab.blogspot.com/feeds/2572476311392722061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yaiiab.blogspot.com/2009/10/shortcut-pipe-your-output-and-change.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3598645319121131665/posts/default/2572476311392722061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3598645319121131665/posts/default/2572476311392722061'/><link rel='alternate' type='text/html' href='http://yaiiab.blogspot.com/2009/10/shortcut-pipe-your-output-and-change.html' title='Shortcut: Pipe Your Output and Change Directory'/><author><name>Dan Helm</name><uri>http://www.blogger.com/profile/01677629886161618458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_OnVrm-y6u6E/St9u8klw7lI/AAAAAAAAAAM/xB95_UcplD4/S220/rickastley.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3598645319121131665.post-4771076808349559337</id><published>2009-10-21T15:46:00.012-04:00</published><updated>2009-10-21T16:00:25.989-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Install'/><category scheme='http://www.blogger.com/atom/ns#' term='Daemon'/><category scheme='http://www.blogger.com/atom/ns#' term='Tomcat'/><title type='text'>Apache Tomcat 6.0 Setup (w/daemon)</title><content type='html'>&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;style&gt;&lt;!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";}@page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.Section1 {page:Section1;}--&gt;&lt;/style&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Objective: &lt;/b&gt;Install Tomcat and run as a daemon. As this is my second Tomcat post, I have issues with their documentation. Here's my guide to getting Tomcat working.&lt;b&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;o:p&gt;OS: CentOS 5.3&lt;br /&gt;Tomcat Version: 6.0.20&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;o:p&gt;Document Conventions:&lt;br /&gt;&lt;/o:p&gt;&lt;/b&gt;$CATALINA_HOME is the root directory of your Tomcat installation.&lt;b&gt;&lt;o:p&gt; &lt;/o:p&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: black;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Preparation/Prerequisites:&lt;/b&gt;&lt;o:p&gt; GCC, Autoconf, Java SD&lt;/o:p&gt;K&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="color: maroon; font-size: small;"&gt;# yum install gcc&lt;o:p&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: maroon; font-size: small;"&gt;# yum install autoconf&lt;o:p&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;div style="color: #660000;"&gt;&lt;span style="font-size: small;"&gt;# yum install java&lt;o:p&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #660000;"&gt;&lt;span style="font-size: small;"&gt;# yum install java-devel&lt;o:p&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="color: black; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;NOTE: Creating a tomcat user is completely optional but may help with error checking and security&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# groupadd tomcat&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# useradd -g tomcat -s /sbin/nologin -d /home/tomcat tomcat&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="color: #660000; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;# passwd tomcat&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;div style="color: #660000;"&gt;&lt;span style="font-size: small;"&gt;&amp;gt;tomcat&lt;o:p&gt;&lt;/o:p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Installation&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# cd /usr/local/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# wget http://latest.version.of.tomcat&lt;latest of="" tomcat="" version=""&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/latest&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;NOTE: Repositories may have an out of date version&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# tar zxvf apache-tomcat-6.0.20.tar.gz&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# chown -R tomcat.tomcat apache-tomcat-6.0.20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;div style="color: #660000;"&gt;&lt;span style="font-size: small;"&gt;# rm apache-tomcat-6.0.20.tar.gz&lt;o:p&gt;&lt;/o:p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="color: black;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Daemon Configuration&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="font-size: small;"&gt;NOTES FROM APACHE: Tomcat can be run as a daemon using the jsvc tool from the commons-daemon project. Source tarballs for jsvc are included with the Tomcat binaries, and need to be compiled. Building jsvc requires a C ANSI compiler (such as GCC), GNU Autoconf, and a JDK. &lt;s&gt;Before running the script, the JAVA_HOME environment variable should be set to the base path of the JDK.&lt;/s&gt;&lt;/span&gt; &lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="color: black; font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Alternately, *when calling the ./configure script, the path of the JDK may be specified using the --with-java parameter, such as ./configure --with-java=/&lt;location java="" of=""&gt;.* &lt;/location&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;div style="color: black;"&gt;&lt;span style="font-size: small;"&gt;NOTE: With JDK 1.6 default is /usr/lib/jvm/java-1.6.0-openjdk.x86_64&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using the following commands should result in a compiled jsvc binary, located in the $CATALINA_HOME/bin folder. This assumes that GNU TAR is used, and that CATALINA_HOME is an environment variable pointing to the base path of the Tomcat installation.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please note that you should use the GNU make (gmake) instead of the native BSD make on FreeBSD systems.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="color: maroon; font-size: small;"&gt;# cd $CATALINA_HOME/bin&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# tar xvfz jsvc.tar.gz&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# cd jsvc-src&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# autoconf&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# ./configure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# make&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# cp jsvc ..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;div style="color: #660000;"&gt;&lt;span style="font-size: small;"&gt;# cd ..&lt;o:p&gt;&lt;/o:p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Starting Tomcat Daemon&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;NOTE: It is possible to start the daemon using this command &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif; margin-left: 0.5in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# ./bin/jsvc -cp ./bin/bootstrap.jar \ -outfile ./logs/catalina.out -errfile ./logs/catalina.err \ org.apache.catalina.startup.Bootstrap&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif; margin-left: 0.5in;"&gt;&lt;span style="font-size: small;"&gt;However, using the script template has given much more success.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# cd $CATALINA_HOME/bin/jsvc-src/native&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# vi Tomcat.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border: 1pt solid windowtext; font-family: Verdana,sans-serif; margin-left: 0.5in; margin-right: 0in; padding: 1pt 4pt;"&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# Adapt the following lines to your configuration&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;JAVA_HOME=&lt;u&gt;/usr/lib/jvm/java-1.6.0-openjdk.x86_64&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;CATALINA_HOME=&lt;u&gt;/usr/local/apache-tomcat-6.0.20&lt;/u&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;DAEMON_HOME=&lt;u&gt;/usr/local/apache-tomcat-6.0.20/bin&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;TOMCAT_USER=&lt;u&gt;tomcat&lt;/u&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;TMP_DIR=/var/tmp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;CATALINA_OPTS=&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;CLASSPATH=\&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;$JAVA_HOME/lib/tools.jar:\&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;$DAEMON_HOME/&lt;u&gt;commons-daemon.jar:\&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;$CATALINA_HOME/&lt;u&gt;bin/bootstrap.jar&lt;/u&gt;&lt;o:p&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: maroon; font-size: small;"&gt;case "$1" in&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp; start)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Start Tomcat&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $DAEMON_HOME/&lt;u&gt;jsvc \&lt;/u&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -user $TOMCAT_USER \&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -home $JAVA_HOME \&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Dcatalina.home=$CATALINA_HOME \&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Djava.io.tmpdir=$TMP_DIR \&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -outfile $CATALINA_HOME/logs/catalina.out \&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -errfile '&amp;amp;1' \&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $CATALINA_OPTS \&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -cp $CLASSPATH \&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u&gt;org.apache.catalina.startup.Bootstrap&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # To get a verbose JVM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #-verbose \&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # To get a debug of jsvc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: medium none; padding: 0in;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #-debug \&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;span style="color: maroon; font-size: small;"&gt;# chmod 755 Tomcat.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# cp Tomcat.sh /etc/rc.d/init.d/tomcat&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;div style="color: #660000;"&gt;&lt;span style="font-size: small;"&gt;# ./etc/rc.d/init.d/tomcat start&lt;o:p&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="font-size: small;"&gt;To start/stop on boot/shutdown, create links in the different run level directories using this template:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# ln -s /etc/rc.d/init.d/tomcat /etc/rc.d/rc3.d/S86tomcat&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;# ln -s /etc/rc.d/init.d/tomcat /etc/rc.d/rc3.d/K14tomcat&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3598645319121131665-4771076808349559337?l=yaiiab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yaiiab.blogspot.com/feeds/4771076808349559337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yaiiab.blogspot.com/2009/10/apache-tomcat-60-setup-wdaemon.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3598645319121131665/posts/default/4771076808349559337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3598645319121131665/posts/default/4771076808349559337'/><link rel='alternate' type='text/html' href='http://yaiiab.blogspot.com/2009/10/apache-tomcat-60-setup-wdaemon.html' title='Apache Tomcat 6.0 Setup (w/daemon)'/><author><name>Dan Helm</name><uri>http://www.blogger.com/profile/01677629886161618458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_OnVrm-y6u6E/St9u8klw7lI/AAAAAAAAAAM/xB95_UcplD4/S220/rickastley.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3598645319121131665.post-2535911187131119748</id><published>2009-10-21T14:05:00.005-04:00</published><updated>2009-10-21T16:06:03.369-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Port 80'/><category scheme='http://www.blogger.com/atom/ns#' term='Tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>Integrating Tomcat into Apache over Port 80</title><content type='html'>&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Objective: &lt;/b&gt;By default, Tomcat runs over port 8080. What if your organization, such as the US Government, likes to block port 8080 on the firewall? You can integrate Tomcat into Apache and run them both on port 80. This task is performed by the mod_jk.so module. When a request for a java page comes in over port 80, Apache will use this module to automatically forward the request to Tomcat. The biggest caveat to this task is the broken functionality of the auto-configurator in Tomcat 6.0 &lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;OS:&lt;/b&gt; CentOS 5.3&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Apache Version:&lt;/b&gt; 2.2&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Tomcat Version:&lt;/b&gt; 6.0.20&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Prerequisites:&lt;/b&gt; Both Apache and Tomcat have been installed and are running properly. You can access the test page for both services over 80 and 8080 respectfully.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Mod_Jk.so: This is the module that will ultimately be the connection point between Apache and Tomcat. This can be obtained from: &lt;a href="http://tomcat.apache.org/download-connectors.cgi"&gt;http://tomcat.apache.org/download-connectors.cgi&lt;/a&gt; It is suggested to use the precompiled binary, however the source is worth looking at as it contains a sample workers.properties file which will be created later in this document.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Document Conventions:&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;${tomcat_home} is the root directory of tomcat. I suggest using at least one symbolic link for your configuration files; this is from experience doing things the hard way. &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;#ln –s /usr/local/apache-tomcat.6.0.20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tomcat&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;${apache_home} is the root directory of apache. On CentOS 5.3 the default directory is /etc/httpd which contains symbolic links to (logs) /var/log/httpd, (modules) /usr/lib64/httpd/modules, and (run) /var/run. If your links or directories are different, please keep this in mind as this document cannot will reference these from time to time when necessary.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Instructions:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Place your obtained mod_jk.so module and place it in the preferred httpd/modules folder. &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Create a workers.properties file in {$tomcat_home}/conf&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;It should, at minimum contain these lines:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;worker.list=ajp13&lt;br /&gt;worker.ajp13.type=ajp13&lt;br /&gt;worker.ajp13.host=&lt;i&gt;hostname.of.webserver (alias is acceptable, fqdn is recommended)&lt;br /&gt;&lt;/i&gt;worker.ajp13.port=8009&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Edit {$tomcat_home}/conf/server.xml&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Change &lt;/span&gt;&lt;span style="color: maroon; font-size: small;"&gt;&lt;engine defaulthost="localhost" name="Catalina"&gt;&lt;br /&gt;&lt;/engine&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;To&lt;/span&gt;&lt;span style="color: maroon; font-size: small;"&gt; &lt;engine defaulthost="&amp;lt;i style=" name="Catalina"&gt;hostname.of.webserver"&amp;gt;&lt;br /&gt;&lt;/engine&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;Below the above statement add &lt;/span&gt;&lt;span style="color: maroon; font-size: small;"&gt;&lt;listener classname="org.apache.jk.config.ApacheConfig" modjk="/etc/httpd/modules/mod_jk.so"&gt;&lt;br /&gt;&lt;/listener&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;Change&lt;/span&gt;&lt;span style="color: maroon; font-size: small;"&gt; &lt;host name="localhost"&gt;&amp;nbsp; appBase="webapps" &lt;br /&gt;unpackWARs="true" autoDeploy="true" &lt;br /&gt;xmlValidation="false" xmlNamespaceAware="false"&amp;gt;&lt;br /&gt;&lt;/host&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;To &lt;/span&gt;&lt;span style="color: maroon; font-size: small;"&gt;&lt;host name="hostname.of.webserver"&gt;&amp;nbsp; appBase="webapps" &lt;br /&gt;unpackWARs="true" autoDeploy="true"&lt;br /&gt;xmlValidation="false" xmlNamespaceAware="false"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/host&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Create a mod_jk.conf file.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;NOTE: Apache Tomcat documentation will reference a directory called {&lt;b&gt;&lt;span style="color: black; font-weight: normal;"&gt;$tomcat_home}/conf/jk.&lt;/span&gt;&lt;/b&gt;&amp;nbsp;This directory may not exist by default and the auto configuration file that is described does not get placed in this folder.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;NOTE: There are two methods to create/modify your mod_jk.conf file – from a template or from scratch. It has been documented that the auto-configuration template option will be phased out in 7.0 and is currently pretty broken. &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Method 1 – Auto-Configuration:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Make sure Tomcat is not running.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;#cd {$tomcat_home}/bin/shutdown&lt;br /&gt;#./shutdown.sh&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;Start Tomcat with the jkconf switch.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;#./startup.sh –jkconf&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;Your newly created mod_jk.conf file will appear in {$tomcat_home}/conf/auto/&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;NOTE: Even after shutting down and restarting Tomcat without the jkconf switch, Tomcat may overwrite the mod_jk.conf file in the {$tomcat_home}/conf/auto/ directory. It is recommended that you move this file to {$tomcat_home}/conf/jk/ &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;NOTE: It is possible that your mod_jk.conf file will work out of the box, however if you are not getting expected results, refer to method 2 and make any changes applicable.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Method 2 – Manual Configuration:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;NOTE: The code below is based on the auto-configuration method. The comment lines are there to show what was changed to make this installation work properly. The virtualhost tags are only necessary if you have more than webhost/webserver on the same machine. If you receive this error in your logs when starting httpd, “JkWorkersFile cannot occur within &lt;virtualhost&gt; section” either comment out the &lt;virtualhost&gt; tags or move the JkWorkersFile line, both shown below.&lt;br /&gt;Create a file called mod_jk.conf in /{$tomcat_home}/conf/jk/ with these lines:&lt;br /&gt;&lt;span style="color: maroon;"&gt;LoadModule jk_module "/etc/httpd/modules/mod_jk.so"&lt;br /&gt;JkWorkersFile /usr/local/tomcat/conf/workers.properties&lt;br /&gt;JkLogLevel info&lt;br /&gt;#JkOptions +ForwardDirectories&lt;br /&gt;#&lt;virtualhost&gt;&lt;i&gt;hostname.of.webserver&lt;/i&gt;&amp;gt;&lt;br /&gt;#ServerName &lt;i&gt;hostname.of.webserver&lt;/i&gt;&lt;br /&gt;JkMount /manager ajp13&lt;br /&gt;JkMount /manager/* ajp13&lt;br /&gt;JkMount /docs ajp13&lt;br /&gt;JkMount /docs/* ajp13&lt;br /&gt;JkMount /examples ajp13&lt;br /&gt;JkMount /examples/* ajp13&lt;br /&gt;JkMount /host-manager ajp13&lt;br /&gt;JkMount /host-manager/* ajp13&lt;br /&gt;#&lt;/virtualhost&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/virtualhost&gt;&lt;/virtualhost&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;NOTE: JkMount tells Apache which directories/files to redirect to Tomcat if those pages are requested. Add accordingly.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Editing httpd.conf&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Open up your httpd.conf file (located in: /etc/httpd/conf)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Add &lt;/span&gt;&lt;span style="color: maroon; font-size: small;"&gt;Include {$tomcat_home}/conf/auto/mod_jk.conf&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;Because mod_jk.conf calls mod_jk.so make sure this line is not in effect: &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: maroon; font-size: small;"&gt;LoadModule jk_module "/etc/httpd/modules/mod_jk.so"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Start/Restart Tomcat&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Start/Restart Apache&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;If you are able to navigate to http://&lt;i&gt;hostname.of.webserver&lt;/i&gt;/manager/html (the Tomcat manager webpage) then you have successfully integrated Tomcat into Apache.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Links:&lt;br /&gt;&lt;/b&gt;&lt;a href="http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html"&gt;http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html#s8"&gt;http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html#s8&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://words.halfhp.com/?p=3"&gt;http://words.halfhp.com/?p=3&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://www.mail-archive.com/users@tomcat.apache.org/msg37961.html"&gt;http://www.mail-archive.com/users@tomcat.apache.org/msg37961.html&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3598645319121131665-2535911187131119748?l=yaiiab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yaiiab.blogspot.com/feeds/2535911187131119748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yaiiab.blogspot.com/2009/10/integrating-tomcat-into-apache-over.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3598645319121131665/posts/default/2535911187131119748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3598645319121131665/posts/default/2535911187131119748'/><link rel='alternate' type='text/html' href='http://yaiiab.blogspot.com/2009/10/integrating-tomcat-into-apache-over.html' title='Integrating Tomcat into Apache over Port 80'/><author><name>Dan Helm</name><uri>http://www.blogger.com/profile/01677629886161618458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_OnVrm-y6u6E/St9u8klw7lI/AAAAAAAAAAM/xB95_UcplD4/S220/rickastley.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3598645319121131665.post-513516485320836727</id><published>2009-10-21T13:00:00.008-04:00</published><updated>2009-10-21T13:45:11.350-04:00</updated><title type='text'>Introduction</title><content type='html'>&lt;div style="font-family: verdana; text-align: left;"&gt;&lt;pre style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: small;"&gt;&lt;span style="font-weight: bold;"&gt;10 PRINT "Hello World!"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;20 GOTO 10&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Verdana,sans-serif;"&gt;&lt;/pre&gt;&lt;div style="font-family: Verdana,sans-serif; text-align: left;"&gt;&lt;span style="color: black; font-family: verdana; font-size: small;"&gt;I never thought I'd start a blog. In general, there isn't much that I have to say which is that important. Through my IT career I've found the answers to questions from a variety of sources including official documentation, fourms, blogs, and sites like answers.yahoo.com. I've learned information is valuable no matter where or who it comes from. This blog will primarily be dedicated to posting my own documentation to contribute to the pool of internet knowledge. It is my hope that I can provide someone with an answer that they can't find anywhere else.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black; font-family: verdana; font-size: small;"&gt;Thanks,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: verdana; font-size: small;"&gt;Daniel&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3598645319121131665-513516485320836727?l=yaiiab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yaiiab.blogspot.com/feeds/513516485320836727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yaiiab.blogspot.com/2009/10/introduction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3598645319121131665/posts/default/513516485320836727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3598645319121131665/posts/default/513516485320836727'/><link rel='alternate' type='text/html' href='http://yaiiab.blogspot.com/2009/10/introduction.html' title='Introduction'/><author><name>Dan Helm</name><uri>http://www.blogger.com/profile/01677629886161618458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_OnVrm-y6u6E/St9u8klw7lI/AAAAAAAAAAM/xB95_UcplD4/S220/rickastley.gif'/></author><thr:total>0</thr:total></entry></feed>
