blob: f494e69b40d43a4879365d3b5c1027e54bb8e732 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<!-- $PAGETITLE -->
<TITLE>OpenEJB - Tomcat Installation</TITLE>
<LINK href="http://openejb.apache.org/all.css" rel="stylesheet" type="text/css">
<!--[if IE]><link rel="stylesheet" type="text/css" media="screen, projection" href="openejb.apache.org/ie.css"><![endif]-->
<LINK rel="SHORTCUT ICON" href="http://openejb.apache.org/images/favicon.ico">
<SCRIPT language="JavaScript" src="http://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=OPENEJB&title=functions.js" type="text/javascript"></SCRIPT>
<META http-equiv="Content-Type" content="text/html;charset=UTF-8">
</HEAD>
<BODY>
<!-- Delay the loading of the external javascript file needed for labels (as it takes too long to load and visibly holds loading of the page body) -->
<!-- To do this without javascript errors over undefined functions, we need to declare stubs here (that are overrided later by the proper implementations) -->
<SCRIPT language="JavaScript" type="text/javascript">
function doAddLabel(hideTextfieldAfterAddParam)
{
// stub
}
function onAddLabel()
{
// stub
}
function showLabelsInput()
{
// stub
}
</SCRIPT>
<A name="top"></A>
<TABLE class="frameTable" cellpadding="0" cellspacing="0" border="0">
<TR class="Row1">
<TD class="Col1"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col2"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col3"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col4"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col5"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
</TR>
<TR class="Row2">
<TD class="Col1"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col2">&nbsp;</TD>
<TD class="Col3" id="breadcrumbs">
<!-- $TOP_NAV_BAR -->
<A href="index.html" title="Index">Home</A> | <A href="news.html" title="News">News</A> | <A href="faq.html" title="FAQ">FAQ</A> | <A href="download.html" title="Download">Download</A> | <A href="mailing-lists.html" title="Mailing Lists">Lists</A> | <A href="http://issues.apache.org/jira/browse/OPENEJB" class="external-link" rel="nofollow">Issues</A>
</TD>
<TD class="Col4"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col5">&nbsp;</TD>
</TR>
<TR class="Row3">
<TD class="Col1"><IMG alt="" class="Row3Img" id="thinLine" src="http://openejb.apache.org/images/line_sm.gif"></TD>
<TD class="Col2"><IMG alt="" class="Row3Img" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col3"><IMG alt="" class="Row3Img" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col4"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col5"><IMG alt="" class="Row3Img" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
</TR>
<TR class="Row4">
<TD class="Col1">
<SPAN id="Navigation">
<H3><A name="Navigation-Overview"></A>Overview</H3>
<UL class="alternate" type="square">
<LI><A href="index.html" title="Index">Home</A></LI>
<LI><A href="news.html" title="News">News</A></LI>
<LI><A href="faq.html" title="FAQ">FAQ</A></LI>
<LI><A href="download.html" title="Download">Download</A></LI>
<LI><A href="../OPENEJBx30/index.html" title="Index">Documentation</A></LI>
<LI><A href="examples.html" title="Examples">Examples</A></LI>
<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
<LI><A href="source-code.html" title="Source Code">Source Code</A></LI>
<LI><A href="http://blogs.apache.org/openejb" class="external-link" rel="nofollow">Project Blog</A></LI>
</UL>
<H3><A name="Navigation-Configuration"></A>Configuration</H3>
<UL class="alternate" type="square">
<LI><A href="configuration.html" title="Configuration">General</A></LI>
<LI><A href="../OPENEJBx30/deployments.html" title="Deployments">Deployments</A></LI>
<LI><A href="containers.html" title="Containers">Containers</A></LI>
</UL>
<H3><A name="Navigation-Servers"></A>Servers</H3>
<UL class="alternate" type="square">
<LI><A href="local-server.html" title="Local Server">Local</A></LI>
<LI><A href="remote-server.html" title="Remote Server">Remote</A></LI>
</UL>
<H3><A name="Navigation-Integrations"></A>Integrations</H3>
<UL class="alternate" type="square">
<LI><A href="tomcat.html" title="Tomcat">Tomcat</A></LI>
<LI><A href="geronimo.html" title="Geronimo">Geronimo</A></LI>
<LI><A href="webobjects.html" title="WebObjects">WebObjects</A></LI>
</UL>
<H3><A name="Navigation-Community"></A>Community</H3>
<UL class="alternate" type="square">
<LI><A href="team.html" title="Team">Team</A></LI>
<LI><A href="articles.html" title="Articles">Articles</A></LI>
<LI><A href="irc://irc.freenode.net/#openejb" class="external-link" rel="nofollow">IRC</A></LI>
</UL>
<H3><A name="Navigation-RelatedProjects"></A>Related Projects</H3>
<UL class="alternate" type="square">
<LI><A href="http://activemq.apache.org/" class="external-link" rel="nofollow">ActiveMQ</A></LI>
<LI><A href="http://openjpa.apache.org/" class="external-link" rel="nofollow">OpenJPA</A></LI>
<LI><A href="http://cxf.apache.org/" class="external-link" rel="nofollow">CXF</A></LI>
</UL>
<H3><A name="Navigation-Index"></A>Index</H3>
<UL class="alternate" type="square">
<LI><A href="space-index.html" title="Space Index">Site Index</A></LI>
<LI><A href="../OPENEJBx30/space-index.html" title="Space Index">Doc Index</A></LI>
</UL>
<H3>
<A name="Navigation-Feeds"></A>
Feeds
</H3>
<UL class="feeds">
<LI>
<A href="http://cwiki.apache.org/confluence/spaces/rss.action?key=OPENEJB&newPages=false">
<IMG src="http://openejb.apache.org/images/rss.gif"></A>
<A class="feedsText" href="http://cwiki.apache.org/confluence/spaces/rss.action?key=OPENEJB&newPages=false">Site</A>
</LI>
<LI><A href="http://cwiki.apache.org/confluence/spaces/blogrss.action?key=OPENEJB">
<IMG src="http://openejb.apache.org/images/rss.gif"></A>
<A class="feedsText" href="http://cwiki.apache.org/confluence/spaces/blogrss.action?key=OPENEJB">News</A>
</LI>
</UL>
</SPAN>
</TD>
<TD class="Col2">&nbsp;</TD>
<TD class="Col3">
<TABLE id="PageHeader" border="0" width="100%">
<TR>
<TD>
<A href="http://openejb.org/">
<IMG hspace="0" src="http://openejb.apache.org/images/logo_openejb.gif" vspace="0">
</A>
</TD>
<TD align="right">
<A href="http://www.apache.org/">
<IMG src="http://www.apache.org/images/asf-logo.gif" width="258" height="66">
</A>
</TD>
</TR>
<TR>
<TD id="page_title">
<!-- $TITLE -->
Tomcat Installation
</TD>
<TD align="right">
<BR><BR>
<!-- Google CSE Search Box Begins -->
<FORM id="searchbox_010475492895890475512:_t4iqjrgx90" action="http://www.google.com/cse">
<INPUT type="hidden" name="cx" value="010475492895890475512:_t4iqjrgx90">
<INPUT type="hidden" name="cof" value="FORID:0">
<INPUT name="q" type="text" size="25">
<INPUT type="submit" name="sa" value="Search">
</FORM>
<SCRIPT type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_010475492895890475512:_t4iqjrgx90"></SCRIPT>
<!-- Google CSE Search Box Ends -->
</TD>
</TR>
</TABLE>
<P>
<!-- $BODY -->
<DIV id="PageContent">
<SCRIPT type="text/javascript">//<![CDATA[
function debug() { }
// ]]></SCRIPT><SCRIPT type="text/javascript" src="http://cwiki.apache.org/confluence/download/resources/org.randombits.confluence.composition:composition-setup/js/browser.js">//<![CDATA[
// ]]></SCRIPT><SCRIPT type="text/javascript" src="http://cwiki.apache.org/confluence/download/resources/org.randombits.confluence.composition:composition-setup/js/behaviour.js">//<![CDATA[
// ]]></SCRIPT><SCRIPT type="text/javascript" src="http://cwiki.apache.org/confluence/download/resources/org.randombits.confluence.composition:composition-setup/js/memory.js">//<![CDATA[
// ]]></SCRIPT><SCRIPT type="text/javascript" src="http://cwiki.apache.org/confluence/download/resources/org.randombits.confluence.composition:composition-setup/js/cloak.js">//<![CDATA[
// ]]></SCRIPT><SCRIPT type="text/javascript">//<![CDATA[
Cloak.closeHTML = "<img src=\'/confluence/download/resources/org.randombits.confluence.composition:toggle-cloak/img/navigate_down_10.gif\'/>";
Cloak.openHTML = "<img src=\'/confluence/download/resources/org.randombits.confluence.composition:toggle-cloak/img/navigate_right_10.gif\'/>";
Cloak.toggleZone = true;
Cloak.memoryDuration = 0;
Cloak.memoryPrefix = "contentId:66824";
Cloak.memoryPath = "/confluence/";
// ]]></SCRIPT><STYLE type="text/css">
.cloakToggle { /* Definition for state toggling image */
cursor:hand;
cursor:pointer;
}
</STYLE><SCRIPT type="text/javascript" src="http://cwiki.apache.org/confluence/download/resources/org.randombits.confluence.composition:composition-setup/js/transitions.js">//<![CDATA[
// ]]></SCRIPT><SCRIPT type="text/javascript" src="http://cwiki.apache.org/confluence/download/resources/org.randombits.confluence.composition:composition-setup/js/deck.js">//<![CDATA[
// ]]></SCRIPT><LINK rel="stylesheet" type="text/css" href="http://cwiki.apache.org/confluence/styles/main-action.css?pluginCompleteKey=org.randombits.confluence.composition:composition-setup&stylesheetName=deck&spaceKey=OPENEJB"><SCRIPT type="text/javascript">//<![CDATA[
Deck.memoryDuration = 0;
Deck.memoryPrefix = "contentId:66824";
Deck.memoryPath = "/confluence/";
// ]]></SCRIPT>
<H1><A name="TomcatInstallation-Overview"></A>Overview</H1>
<P>Tomcat installation is very simple, and can be describes as &quot;Unpack and Run&quot;. These instructions were written using Tomcat 6.0.14 but any recent 6.x version should work. If you are comfortable with the CLI, these the following quick instructions will get you going ASAP; otherwise skip to the <A href="#TomcatInstallation-download">Download Tomcat</A> section.</P>
<OL>
<LI>Download Tomcat zip or tar.gz</LI>
<LI>Unpack archive</LI>
<LI>Platform specific setup
<UL>
<LI>[Unix] If zip was unpacked, <TT>chmod u+x bin/*.sh</TT></LI>
<LI>[Windows] <TT>set JAVA_HOME =C:\your\java\installation</TT></LI>
</UL>
</LI>
<LI>Run bin/startup.sh or bin/startup.bat</LI>
<LI>Visit <A href="http://localhost:8080/" class="external-link" rel="nofollow">http://localhost:8080/</A></LI>
<LI>Run bin/shutdown.sh or bin/shutdown.bat</LI>
</OL>
<H1><A name="TomcatInstallation-DownloadTomcat"></A><A name="TomcatInstallation-download"></A> Download Tomcat</H1>
<P>Download Tomcat 6 zip file from <A href="http://tomcat.apache.org/download-60.cgi#6.0.14" class="external-link" rel="nofollow">here</A>. </P>
<H1><A name="TomcatInstallation-UnpackTomcat"></A>Unpack Tomcat</H1>
<P>Unpack the Tomcat zip file which will create a new directory containing the complete Tomcat installation.</P>
<DIV id="deck:unpack tomcat" class="deck" tablocation="top" style="display: none" loopcards="false"><DIV class="cards tabbed">
<P><DIV class="card" label="Windows" labelrendered="Windows"><PRE>C:\&gt;jar -xvf apache-tomcat-6.0.14.zip
created: apache-tomcat-6.0.14/
created: apache-tomcat-6.0.14/bin/
created: apache-tomcat-6.0.14/conf/
...snip...
C:\&gt;dir apache-tomcat-6.0.14
Volume in drive C has no label.
Volume Serial Number is 0000-0000
Directory of C:\apache-tomcat-6.0.14
09/20/2007 09:14 PM &lt;DIR&gt; .
09/20/2007 09:14 PM &lt;DIR&gt; ..
09/20/2007 09:15 PM &lt;DIR&gt; bin
09/20/2007 09:15 PM &lt;DIR&gt; conf
09/20/2007 09:15 PM &lt;DIR&gt; lib
07/20/2007 04:20 AM 11,560 LICENSE
09/20/2007 09:14 PM &lt;DIR&gt; logs
07/20/2007 04:20 AM 556 NOTICE
07/20/2007 04:20 AM 6,656 RELEASE-NOTES
07/20/2007 04:20 AM 5,829 RUNNING.txt
09/20/2007 09:14 PM &lt;DIR&gt; temp
09/20/2007 09:14 PM &lt;DIR&gt; webapps
09/20/2007 09:14 PM &lt;DIR&gt; work
4 File(s) 24,601 bytes
9 Dir(s) 5,085,085,696 bytes free
</PRE></DIV><BR>
<DIV class="card" label="Unix" labelrendered="Unix"><PRE>$ jar -xvf apache-tomcat-6.0.14.zip
created: apache-tomcat-6.0.14/
created: apache-tomcat-6.0.14/bin/
created: apache-tomcat-6.0.14/conf/
...snip...
$ ls apache-tomcat-6.0.14/
LICENSE RELEASE-NOTES bin/ lib/ temp/ work/
NOTICE RUNNING.txt conf/ logs/ webapps/
</PRE></DIV></P>
</DIV></DIV>
<H1><A name="TomcatInstallation-%5CWindows%5CSetJAVAHOMEenvironmentvariable"></A>[Windows] Set JAVA_HOME environment variable</H1>
<P>For Windows users, the Tomcat shell scripts must know the location of the Java installation, and this is done with environment variables. The following command will set the JAVA_HOME environment variable:</P>
<DIV id="deck:unpack tomcat" class="deck" tablocation="top" style="display: none" loopcards="false"><DIV class="cards tabbed">
<P><DIV class="card" label="Windows" labelrendered="Windows"><PRE>C:\&gt;set JAVA_HOME =C:\your\java\installation
</PRE></DIV></P>
</DIV></DIV>
<H1><A name="TomcatInstallation-%5CUnix%5CMakeshellscriptsexecutable"></A>[Unix] Make shell scripts executable</H1>
<P>For Unix users, the shell scripts in the Tomcat installation are not executable by default, so in order to execute them, you must set mark them as executable. If you unpacked the Tomcat tar.gz file, the scripts are already executable. The following command will make all shell scripts executable:</P>
<DIV id="deck:unpack tomcat" class="deck" tablocation="top" style="display: none" loopcards="false"><DIV class="cards tabbed">
<P><DIV class="card" label="Unix" labelrendered="Unix"><PRE>apache-tomcat-6.0.14$ chmod u+x bin/*.sh
</PRE></DIV></P>
</DIV></DIV>
<H1><A name="TomcatInstallation-StartTomcat"></A>Start Tomcat</H1>
<P>Execute the following command to start the Tomcat server:</P>
<DIV id="deck:Start Tomcat" class="deck" tablocation="top" style="display: none" loopcards="false"><DIV class="cards tabbed">
<P><DIV class="card" label="Windows" labelrendered="Windows"><PRE>C:\&gt;cd apache-tomcat-6.0.14\bin
C:\apache-tomcat-6.0.14\bin&gt;startup.bat
Using CATALINA_BASE: C:\apache-tomcat-6.0.14
Using CATALINA_HOME: C:\apache-tomcat-6.0.14
Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.14\temp
Using JRE_HOME: C:\your\java\installation
</PRE></DIV><BR>
<DIV class="card" label="Unix" labelrendered="Unix"><PRE>$ cd apache-tomcat-6.0.14/bin
apache-tomcat-6.0.14/bin$ ./startup.sh
Using CATALINA_BASE: /your/tomcat/installation/apache-tomcat-6.0.14
Using CATALINA_HOME: /your/tomcat/installation/apache-tomcat-6.0.14
Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
Using JRE_HOME: /your/java/installation
</PRE></DIV></P>
</DIV></DIV>
<P><B>NOTE:</B> Your output will be different from the example above due to differences in installation location.</P>
<H1><A name="TomcatInstallation-VerifyTomcatisRunning"></A>Verify Tomcat is Running</H1>
<P>Visit <A href="http://localhost:8080/" class="external-link" rel="nofollow">http://localhost:8080/</A> and you should see the Tomcat welcome page.</P>
<H1><A name="TomcatInstallation-StopTomcat"></A>Stop Tomcat</H1>
<P>Shutdown Tomcat by executing the following command:</P>
<DIV id="deck:Start Tomcat" class="deck" tablocation="top" style="display: none" loopcards="false"><DIV class="cards tabbed">
<P><DIV class="card" label="Windows" labelrendered="Windows"><PRE>C:\apache-tomcat-6.0.14\bin&gt;shutdown.bat
Using CATALINA_BASE: C:\apache-tomcat-6.0.14
Using CATALINA_HOME: C:\apache-tomcat-6.0.14
Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.14\temp
Using JRE_HOME: C:\your\java\installation
</PRE></DIV><BR>
<DIV class="card" label="Unix" labelrendered="Unix"><PRE>apache-tomcat-6.0.14/bin$ ./shutdown.sh
Using CATALINA_BASE: /your/tomcat/installation/apache-tomcat-6.0.14
Using CATALINA_HOME: /your/tomcat/installation/apache-tomcat-6.0.14
Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
Using JRE_HOME: /your/java/installation
</PRE></DIV></P>
</DIV></DIV>
<P><B>NOTE:</B> Your output will be different from the example above due to differences in installation locations.</P>
</DIV>
</P>
</TD>
<TD class="Col4"><IMG src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col5">
</TD>
</TR>
<TR class="Row5">
<TD class="Col1">&nbsp;</TD>
<TD class="Col2">&nbsp;</TD>
<TD class="Col3">
<BR>
<BR>
<IMG width="100%" height="1" src="http://openejb.apache.org/images/line_light.gif">
<TABLE width="100%">
<TR>
<TD>
<SPAN class="bodyGrey">
<SMALL>
<NOTICE><!-- $FOOTER -->
Apache OpenEJB is an project of The Apache Software Foundation (ASF)
</NOTICE>
<BR>
Site Powered by
<A href="http://atlassian.com/">Atlassian</A>
<A href="http://atlassian.com/confluence/">Confluence</A>
.
</SMALL>
</SPAN>
</TD>
<TD align="right">
<A style="color:#999;font-size:small;font-weight:normal;" href="http://cwiki.apache.org/confluence/pages/editpage.action?spaceKey=OPENEJB&title=Tomcat%20Installation">[ edit ]</A>
</TD>
</TR>
</TABLE>
<BR>
</TD>
<TD class="Col4"><IMG src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col5">&nbsp;</TD>
</TR>
</TABLE>
<!-- Needed for composition plugin -->
<!-- delay the loading of large javascript files to the end so that they don't interfere with the loading of page content -->
<SPAN style="display: none">
<SCRIPT type="text/javascript" language="JavaScript" src="http://cwiki.apache.org/confluence/labels-javascript"></SCRIPT>
<SCRIPT src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</SCRIPT>
<SCRIPT type="text/javascript">
_uacct = "UA-2717626-1";
urchinTracker();
</SCRIPT>
</SPAN>
</BODY>
</HTML>