geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v3.0 > Quick start - Apache Geronimo for the impatient
Date Mon, 17 Jan 2011 19:28:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2036/9/4/_/styles/combined.css?spaceKey=GMOxDOC30&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Quick+start+-+Apache+Geronimo+for+the+impatient">Quick
start - Apache Geronimo for the impatient</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~kevan">Kevan
Miller</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" ># In the command-line interface, go
to the *&lt;geronimo_home&gt;/bin* directory. <br># Type the following command:
<br></td></tr>
            <tr><td class="diff-changed-lines" >#* <span class="diff-changed-words">*{{<span
class="diff-added-chars"style="background-color: #dfd;">./</span>geronimo</span>
run}}* <br></td></tr>
            <tr><td class="diff-unchanged" > <br>The command starts the
server within the command-line interface instead of in the background. When the server is
started, you can see the following information. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>If you are in a hurry to have Apache Geronimo up and running, this article
can show you the basic steps of downloading, building (when needed) and running the server
in a short time.</p>

<p>All you need is 5 to 10 minutes to follow these steps.</p>

<div>
<ul>
    <li><a href='#Quickstart-ApacheGeronimofortheimpatient-Gettingthesoftware'>Getting
the software</a></li>
<ul>
    <li><a href='#Quickstart-ApacheGeronimofortheimpatient-Prerequisites'>Prerequisites</a></li>
    <li><a href='#Quickstart-ApacheGeronimofortheimpatient-Downloadingbinaryfiles'>Downloading
binary files</a></li>
</ul>
    <li><a href='#Quickstart-ApacheGeronimofortheimpatient-Startingtheserver'>Starting
the server</a></li>
    <li><a href='#Quickstart-ApacheGeronimofortheimpatient-Creatinganddeployingasampleapplication'>Creating
and deploying a sample application</a></li>
<ul>
    <li><a href='#Quickstart-ApacheGeronimofortheimpatient-Deployingandtestingtheapplication'>Deploying
and testing the application</a></li>
</ul>
    <li><a href='#Quickstart-ApacheGeronimofortheimpatient-Stoppingtheserver'>Stopping
the server</a></li>
    <li><a href='#Quickstart-ApacheGeronimofortheimpatient-Summary'>Summary</a></li>
</ul></div>

<h1><a name="Quickstart-ApacheGeronimofortheimpatient-Gettingthesoftware"></a>Getting
the software</h1>
<p>There are currently the following two ways to get the released software: </p>

<ul>
	<li>Retrieve the source code from the Apache SVN repository.</li>
	<li>Download the binary files from the Apache Geronimo Web site.</li>
</ul>


<p>This section only shows how to download the binary files from the Apache Geronimo
Web site because this way is faster and easier than retrieving the source code from the Apache
SVN repository.</p>

<h2><a name="Quickstart-ApacheGeronimofortheimpatient-Prerequisites"></a>Prerequisites</h2>
<p>Before you install Geronimo, you must install the Java Runtime Environment (JRE)
or Java Development Kit (JDK). JDK is only required for wsgen tools.</p>

<h3><a name="Quickstart-ApacheGeronimofortheimpatient-InstallingJavaSE6"></a>Installing
Java SE 6</h3>
<p>Apache Geronimo v3.0-M1 is a non-certified milestone release containing some Java
EE 6 features and support for the OSGi programming model. For more information about how to
download and install the latest Java SE 6 JRE or JDK, go <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html"
class="external-link" rel="nofollow">here</a>.</p>

<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td>Geronimo 3.0-M1 is
a milestone release and should only be used for learning about the upcoming Geronimo 3.0 release
with Java EE 6 and OSGi/Aries support and not for any type of production usage.</td></tr></table></div>

<h2><a name="Quickstart-ApacheGeronimofortheimpatient-Downloadingbinaryfiles"></a>Downloading
binary files</h2>
<p>You can go to <a href="http://geronimo.apache.org/downloads.html" class="external-link"
rel="nofollow">http://geronimo.apache.org/downloads.html</a> to download the available
packages (binary files and source code). You must select the installation file according to
the platform that you plan to install and run Apache Geronimo on.</p>

<p>Geronimo v3.0-M1 is available in the following three assembly configurations:</p>

<ul>
	<li>Web Container releases : Java EE 6 web profile(not certified)</li>
	<li>Minimal (Little-G) : Web Container, Transaction, and Connector capabilities</li>
	<li>Framework : Geronimo kernel core functionality</li>
</ul>


<p>In this section, we use the release with Tomcat Web container for demonstration.
For more information about the difference between these three assembly configurations, see
<a href="/confluence/display/GMOxDOC30/Getting+and+installing+Geronimo" title="Getting
and installing Geronimo">Getting and installing Geronimo</a>.</p>

<p>You can download the installation file with the compression format (.zip or .tar.gz)
that is compatible with your operating system by clicking the link on the website. To install
Apache Geronimo, extract the binary files to a new directory on your hard disk, for example,
d:/geronimo. In the rest of this section, this directory is referred to as <b>&lt;geronimo_home&gt;</b>.</p>

<h1><a name="Quickstart-ApacheGeronimofortheimpatient-Startingtheserver"></a>Starting
the server</h1>
<p>To start Apache Geronimo:</p>

<ol>
	<li>In the command-line interface, go to the <b>&lt;geronimo_home&gt;/bin</b>
directory.</li>
	<li>Type the following command:
	<ul>
		<li><b><tt>./geronimo run</tt></b></li>
	</ul>
	</li>
</ol>


<p>The command starts the server within the command-line interface instead of in the
background. When the server is started, you can see the following information.</p>

<div class="preformatted panel" style="border-style: solid;border-width: 1px;"><div
class="preformattedContent panelContent">
<pre>Using GERONIMO_HOME:   D:\geronimo
Using GERONIMO_TMPDIR: var/temp
Using JRE_HOME:        C:\java-i386-60\jre
                                                          
     ______                       _                       
    / ____/___  _________  ____  (_)____ ___  ____        
   / / __ / _ \/ ___/ __ \/ __ \/ // __ `__ \/ __ \  
  / /_/ //  __/ /  / /_/ / / / / // / / / / / /_/ /       
  \____/ \___/_/   \____/_/ /_/_//_/ /_/ /_/\____/    

  Apache Geronimo (3.0-M1)

Hit '&lt;tab&gt;' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '&lt;ctrl-d&gt;' or 'osgi:shutdown' to shutdown Geronimo.

geronimo&gt; Booting Geronimo Kernel (in Java 1.6.0)...
Module  1/36 org.apache.geronimo.framework/j2ee-system/3.0-M1/car              started in
  .000s
Module  2/36 org.apache.geronimo.framework/rmi-naming/3.0-M1/car               started in
  .224s
Module  3/36 org.apache.geronimo.framework/plugin/3.0-M1/car                   started in
  .146s
Module  4/36 org.apache.geronimo.framework/j2ee-security/3.0-M1/car            started in
  .250s
Module  5/36 org.apache.geronimo.framework/server-security-config/3.0-M1/car   started in
  .026s
Module  6/36 org.apache.geronimo.framework/geronimo-gbean-deployer/3.0-M1/car  started in
  .206s
Module  7/36 org.apache.geronimo.configs/j2ee-server/3.0-M1/car                started in
  .026s
Module  8/36 org.apache.geronimo.configs/j2ee-deployer/3.0-M1/car              started in
  .092s
Module  9/36 org.apache.geronimo.configs/transaction-1_6/3.0-M1/car            started in
  .212s
Module 10/36 org.apache.geronimo.configs/connector-deployer-1_6/3.0-M1/car     started in
  .083s
Module 11/36 org.apache.geronimo.configs/jasper/3.0-M1/car                     started in
  .022s
Module 12/36 org.apache.geronimo.configs/tomcat7/3.0-M1/car                    started in
 1.175s
Module 13/36 org.apache.geronimo.configs/tomcat7-deployer/3.0-M1/car           started in
  .028s
Module 14/36 org.apache.geronimo.configs/web-extender/3.0-M1/car               started in
  .014s
Module 15/36 org.apache.geronimo.configs/welcome-tomcat/3.0-M1/car             started in
  .541s
Module 16/36 org.apache.geronimo.configs/remote-deploy-tomcat/3.0-M1/car       started in
  .431s
Module 17/36 org.apache.geronimo.configs/jasper-deployer/3.0-M1/car            started in
  .007s
Module 18/36 org.apache.geronimo.configs/myfaces/3.0-M1/car                    started in
  .016s
Module 19/36 org.apache.geronimo.configs/myfaces-deployer/3.0-M1/car           started in
  .014s
Module 20/36 org.apache.geronimo.configs/aries-deployer/3.0-M1/car             started in
  .009s
Module 21/36 org.apache.geronimo.configs/persistence-jpa20-deployer/3.0-M1/car started in
  .026s
Module 22/36 org.apache.geronimo.configs/openjpa2/3.0-M1/car                   started in
  .004s
Module 23/36 org.apache.geronimo.configs/system-database/3.0-M1/car            started in
 8.714s
Module 24/36 org.apache.geronimo.configs/dojo-tomcat/3.0-M1/car                started in
  .077s
Module 25/36 org.apache.geronimo.plugins/pluto-support/3.0-M1/car              started in
  .005s
Module 26/36 org.apache.geronimo.plugins/console-tomcat/3.0-M1/car             started in
  .872s
Module 27/36 org.apache.geronimo.plugins/plugin-console-tomcat/3.0-M1/car      started in
  .521s
Module 28/36 org.apache.geronimo.configs/client-deployer/3.0-M1/car            started in
  .029s
Module 29/36 org.apache.geronimo.configs/webservices-common/3.0-M1/car         started in
  .000s
Module 30/36 org.apache.geronimo.configs/openejb/3.0-M1/car                    started in
  .674s
Module 31/36 org.apache.geronimo.configs/openejb-deployer/3.0-M1/car           started in
  .029s
Module 32/36 org.apache.geronimo.configs/openejb-corba-deployer/3.0-M1/car     started in
  .035s
Module 33/36 org.apache.geronimo.configs/j2ee-corba-yoko/3.0-M1/car            started in
  .308s
Module 34/36 org.apache.geronimo.configs/activemq-broker-blueprint/3.0-M1/car  started in
  .877s
Module 35/36 org.apache.geronimo.configs/activemq-ra/3.0-M1/car                started in
  .240s
Module 36/36 org.apache.geronimo.configs/javamail/3.0-M1/car                   started in
  .026s
Startup completed in 23.324s seconds
  Listening on Ports:
    1050 127.0.0.1   CORBA Naming Service
    1099 127.0.0.1   RMI Naming
    1527 127.0.0.1   Derby Connector
    2001 127.0.0.1   OpenEJB ORB Adapter
    4201 127.0.0.1   OpenEJB Daemon
    4203 127.0.0.1   OpenEJB Daemon
    6142 239.255.3.2 OpenEJB Daemon
    6882 127.0.0.1   OpenEJB ORB Adapter
    8009 127.0.0.1   Tomcat Connector AJP TomcatAJPConnector
    8080 127.0.0.1   Tomcat Connector HTTP BIO TomcatWebConnector
    8443 127.0.0.1   Tomcat Connector HTTPS BIO TomcatWebSSLConnector
    9999 127.0.0.1   JMX Remoting Connector

  Started Application Modules:
    EAR: org.apache.geronimo.plugins/console-tomcat/3.0-M1/car
    RAR: org.apache.geronimo.configs/activemq-ra/3.0-M1/car
    RAR: org.apache.geronimo.configs/system-database/3.0-M1/car
    WAR: org.apache.geronimo.configs/dojo-tomcat/3.0-M1/car
    WAR: org.apache.geronimo.configs/remote-deploy-tomcat/3.0-M1/car
    WAR: org.apache.geronimo.configs/welcome-tomcat/3.0-M1/car
    WAR: org.apache.geronimo.plugins/plugin-console-tomcat/3.0-M1/car

  Web Applications:
    /
    /console
    /console-base
    /dojo
    /plugin
    /remote-deploy

Geronimo Application Server started
</pre>
</div></div>

<p>To verify that the Apache Geronimo server is running, go to <a href="http://localhost:8080/console"
class="external-link" rel="nofollow">http://localhost:8080/console</a> to open the
Geronimo administrative console. The Geronimo administrative console is the first application
you can test. It is deployed in the standard, full Java EE certified distribution of Apache
Geronimo.</p>

<p>When the Geronimo administrative console is open, enter <b>system</b>
as the user name and <b>manager</b> as the password.</p>

<p>The following figure shows the Web-based Geronimo administrative console.</p>

<p><span class="image-wrap" style=""><img src="/confluence/download/attachments/20645272/console_login.jpg?version=1&amp;modificationDate=1206991187000"
style="border: 0px solid black" /></span></p>

<p>Now you have Apache Geronimo up and running. The following section shows you how
to create, deploy, and run a sample JSP Web application on Apache Geronimo.</p>

<h1><a name="Quickstart-ApacheGeronimofortheimpatient-Creatinganddeployingasampleapplication"></a>Creating
and deploying a sample application</h1>
<p>To create a <b>HelloWorld</b> JSP Web application:</p>

<ol>
	<li>Create a new directory to hold all the application related files. In the rest of
this section, this directory is referred to as <b>&lt;app_home&gt;</b>.</li>
	<li>In the &lt;app_home&gt; directory, create a plain text file named <b>HelloWorld.jsp</b>,
and then copy the following code to this file.</li>
</ol>


<p><b>Note:</b> To save time, you can download <a href="/confluence/download/attachments/20645272/HelloWorld.war?version=1&amp;modificationDate=1287525796000">HelloWorld.war</a>
file from this page.</p>

<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader
panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>HelloWorld.jsp</b></div><div
class="codeContent panelContent">
<pre class="code-html">
<span class="code-tag">&lt;html&gt;</span>
   <span class="code-tag">&lt;head&gt;</span>
      <span class="code-tag">&lt;jsp:useBean id=<span class="code-quote">"datetime"</span>
class=<span class="code-quote">"java.util.Date"</span>/&gt;</span>
         <span class="code-tag">&lt;title&gt;</span>
             Basic HelloWorld JSP
         <span class="code-tag">&lt;/title&gt;</span>
   <span class="code-tag">&lt;/head&gt;</span>
   <span class="code-tag">&lt;body bgcolor=<span class="code-quote">"#1276C2"</span>&gt;</span>
      <span class="code-tag">&lt;h1&gt;</span>
         <span class="code-tag">&lt;font face=<span class="code-quote">"tahoma"</span>
color=<span class="code-quote">"white"</span>&gt;</span>
               Hello world from GERONIMO!
         <span class="code-tag">&lt;/font&gt;</span>
      <span class="code-tag">&lt;/h1&gt;</span>
      <span class="code-tag">&lt;font face=<span class="code-quote">"tahoma"</span>
color=<span class="code-quote">"white"</span>&gt;</span>on ${datetime}<span
class="code-tag">&lt;/font&gt;</span>
   <span class="code-tag">&lt;/body&gt;</span>
<span class="code-tag">&lt;/html&gt;</span>
</pre>
</div></div>

<p>To deploy an application, you must create a Geronimo specific deployment plan. To
create the deployment plan for the sample application:</p>

<ol>
	<li>Create a directory named <b>WEB-INF</b> in the &lt;app_home&gt;
directory.</li>
	<li>In the &lt;app_home&gt;/WEB-INF directory, create a plain text file named
<b>geronimo-web.xml</b>, and then copy the following code to this file.
<br class="atl-forced-newline" />
<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader
panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>Geronimo
deployment plan geronimo-web.xml</b></div><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;?xml version=<span class="code-quote">"1.0"</span>
encoding=<span class="code-quote">"UTF-8"</span>?&gt;</span>
<span class="code-tag">&lt;web-app xmlns=<span class="code-quote">"http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"</span>&gt;</span>
    <span class="code-tag">&lt;environment&gt;</span>
        <span class="code-tag">&lt;moduleId&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.samples<span
class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>HelloWorldApp<span
class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>1.0<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>war<span class="code-tag">&lt;/type&gt;</span>
        <span class="code-tag">&lt;/moduleId&gt;</span>             
    <span class="code-tag">&lt;/environment&gt;</span>
    <span class="code-tag">&lt;context-root&gt;</span>/hello<span class="code-tag">&lt;/context-root&gt;</span>
<span class="code-tag">&lt;/web-app&gt;</span>
</pre>
</div></div>
<p><br class="atl-forced-newline" /></p></li>
	<li>In the &lt;app_home&gt;/WEB-INF directory, create a plain text file named
<b>web.xml</b>, and then copy the following code to this file.
<br class="atl-forced-newline" />
<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader
panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>web.xml</b></div><div
class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;?xml version=<span class="code-quote">"1.0"</span>
encoding=<span class="code-quote">"UTF-8"</span>?&gt;</span>
&lt;web-app version=<span class="code-quote">"2.4"</span> xmlns=<span class="code-quote">"http://java.sun.com/xml/ns/j2ee"</span>
                       <span class="code-keyword">xmlns:xsi</span>=<span class="code-quote">"http://www.w3.org/2001/XMLSchema-instance"</span>
		       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
		       http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
    
    <span class="code-tag">&lt;welcome-file-list&gt;</span>
        <span class="code-tag">&lt;welcome-file&gt;</span>HelloWorld.jsp<span
class="code-tag">&lt;/welcome-file&gt;</span>
    <span class="code-tag">&lt;/welcome-file-list&gt;</span>

<span class="code-tag">&lt;/web-app&gt;</span>
</pre>
</div></div></li>
</ol>


<h2><a name="Quickstart-ApacheGeronimofortheimpatient-Deployingandtestingtheapplication"></a>Deploying
and testing the application</h2>
<p>In this example, we do not invest time in packaging the application. Instead, we
use the <tt>--inPlace</tt> feature of the deployer tool to deploy the application.
You can use this feature to deploy an application from any directory.</p>

<p>To deploy the application:</p>

<ol>
	<li>In the command-line interface, go to the &lt;geronimo_home&gt;/bin directory.</li>
	<li>Type the following command:</li>
</ol>


<div class="preformatted panel" style="border-style: solid;border-width: 1px;"><div
class="preformattedContent panelContent">
<pre>deploy --user system --password manager deploy --inPlace &lt;app_home&gt;
</pre>
</div></div>

<p><b>Note:</b> As a quick alternative, the three files in this Hello World
sample have been packaged into <a href="/confluence/download/attachments/20645272/HelloWorld.war?version=1&amp;modificationDate=1287525796000">HelloWorld.war</a>
and attached to this page.  To deploy it:</p>

<ol>
	<li>Download <a href="/confluence/download/attachments/20645272/HelloWorld.war?version=1&amp;modificationDate=1287525796000">HelloWorld.war</a>
to <b>&lt;war_home&gt;</b> on your system.</li>
	<li>Deploy it via:</li>
</ol>


<div class="preformatted panel" style="border-style: solid;border-width: 1px;"><div
class="preformattedContent panelContent">
<pre>deploy --user system --password manager deploy &lt;war_home&gt;/HelloWorld.war
</pre>
</div></div>

<p>When the application is successfully deployed, you can see the following message:</p>

<div class="preformatted panel" style="border-style: solid;border-width: 1px;"><div
class="preformattedContent panelContent">
<pre>D:\geronimo\bin&gt;deploy --user system --password manager deploy --inPlace
\HelloWorld
Using GERONIMO_HOME:   D:\geronimo
Using GERONIMO_TMPDIR: var\temp
Using JRE_HOME:        C:\java-i386-60\jre
    Deployed sample.applications/HelloWorldApp/1.0/war @ /hello
</pre>
</div></div>

<p>To test the application, go to <a href="http://localhost:8080/hello" class="external-link"
rel="nofollow">http://localhost:8080/hello</a>.</p>


<h1><a name="Quickstart-ApacheGeronimofortheimpatient-Stoppingtheserver"></a>Stopping
the server</h1>
<p>In the command-line interface where the server is started, press CTRL+C to stop the
server.</p>


<h1><a name="Quickstart-ApacheGeronimofortheimpatient-Summary"></a>Summary</h1>

<p>This article shows you how simple it is to have Apache Geronimo up and running. It
takes less than five minutes to start the server if you have installed the prerequisites.
Additionally, this article shows you how to create, deploy and test a simple JSP Web application
in less than five minutes.</p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Quick+start+-+Apache+Geronimo+for+the+impatient">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=20645272&revisedVersion=8&originalVersion=7">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Quick+start+-+Apache+Geronimo+for+the+impatient?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message