Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Depending on the platform you plan to install and run Apache Geronimo download the appropriate insallation image.
Select the file compression format compatible with your system (.zip, .tar, .gz) by clicking directly on the link, download it and expand the binary to your hard drive in a new directory.

The installation of Apache Geronimo is as simple as uncompressing the .zip or .tar files.
Change the From a command line window change directory to the <geronimo_home> directory and start the server using the following command:

java -jar server.jar

Changing default ports

The HTTP port is the standard network that the Web container uses. This port number has to be used on any HTTP URL that calls Web applications running on Geronimo. The server and startup configuration modules of Geronimo are controlled by the config.xml file with the default HTTP listener configured on port being 8080.

There are several reasons for changing the network ports, namely to run multiple instances of Geronimo. To configure the default port edit the <geronimo_home>/var/config/config.xml file. Go to the file and open in a text editor. The file will look like below:The out-of-the-box config.xml for Apache Geronimo v1.2 with Tomcat distribution is shown in the following example.

Code Block
xml
xml
borderStylesolid
titleconfig.xml
<?xml version="1.0" encoding="UTF-8"?>

<!-- ======================================================== -->
<!-- Warning - This XML file is re-generated by Geronimo when -->
<!-- changes are made to Geronimo's configuration, therefore  -->
<!-- any comments added to this file will be lost.            -->
<!-- === Do not edit this file while Geronimo is running.         -->
<!-- ======================================================== -->

<attributes xmlns="http://geronimo.apache.org/xml/ns/attributes-1.1">
    <module name="org.apache.geronimo.configs/rmi-naming/1.1-4108062/car">
        <gbean name="RMIRegistry">
            <attribute name="port">1099</attribute>
        </gbean>
        <gbean name="NamingProperties">
            <!-- Check whether this really works if host name is 0.0.0.0 -->
            <attribute name="<attribute name="namingProviderUrl">rmi://0.0.0.0:1099</attribute>
        </gbean>
    </module>
    <module<gbean name="geronimo/j2ee-server/1.1-410806/carDownloadedPluginRepos">
      </module>
      <module<attribute name="repositoryList"geronimo>http:/j2ee-security/1.1-410806/car">
        <gbean name="JaasLoginServiceRemotingServer">geronimo.apache.org/plugins/plugin-repository-list-1.2.txt</attribute>
            <attribute name="host">0.0.0.0<userRepositories">[]</attribute>
        </gbean>
    <attribute name="port">4242</attribute></module>
        </gbean>
<module name="org.apache.geronimo.configs/j2ee-server/1.2/car"/>
    <module name="org.apache.geronimo.configs/transaction/1.2/car"/>
    <gbean<module name="JMXServiceorg.apache.geronimo.configs/j2ee-security/1.2/car">
        <gbean  <attribute name="protocolJaasLoginServiceRemotingServer">rmi</attribute>>
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">9999<>4242</attribute>
        </gbean>
  <attribute      <gbean name="urlPathJMXService">/jndi/rmi://0.0.0.0:1099/JMXConnector</attribute>
        </gbean>
     </module>
<attribute name="protocol">rmi</attribute>
       <module name="geronimo/axis/1.1-410806/car"/>
    <module<attribute name="geronimo/openejb/1.1-410806/car">host">0.0.0.0</attribute>
        <gbean    <attribute name="EJBNetworkServiceport">>9999</attribute>
            <attribute name="host">0urlPath">/jndi/rmi://0.0.0.0<0:1099/JMXConnector</attribute>
            <attribute name="port">4201</attribute></gbean>
        </gbean>module>
    </module><module name="org.apache.geronimo.configs/axis/1.2/car"/>
    <module name="org.apache.geronimo.configs/j2ee-corbaopenejb/1.1-4108062/car" load="false">
        <gbean name="NameServerEJBNetworkService">
            <attribute name="dbDir">var/cosnaming.db<host">0.0.0.0</attribute>
            <attribute name="port">1050<>4201</attribute>
        </gbean>
    </module>
    <gbean<module load="false" name="Serverorg.apache.geronimo.configs/j2ee-corba-yoko/1.2/car">
           <gbean <attribute name="argsNameServer">-ORBInitRef, NameService=corbaloc::localhost:1050/NameService</attribute>
        </gbean>
    <attribute    <gbean name="UnprotectedServerport">>1050</attribute>
            <attribute name="args">-ORBInitRef, NameService=corbaloc::localhost:1050/NameService</host">localhost</attribute>
        </gbean>
    </module>
    <module load="false" name="org.apache.geronimo.configs/systemj2ee-corba-databasesun/1.1-4108062/car">
        <gbean name="DerbyNetworkNameServer">
            <attribute name="host">0.0.0.0<port">1050</attribute>
            <attribute name="porthost">1527<>localhost</attribute>
        </gbean>
    </module>
    <module name="geronimo/activemq-brokerorg.apache.geronimo.configs/system-database/1.1-4108062/car">
        <gbean name="ActiveMQ.tcp.defaultDerbyNetwork">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">61616<>1527</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/activemq-broker/1.1-4108062/car"/>
      <module  <gbean name="geronimo/directory/1.1-410806/car" load="false">
ActiveMQ.tcp.default">
         <gbean   <attribute name="host"geronimo.server:name=DirectoryService">
            <attribute name="host">0.>0.0.0.0</attribute>
            <attribute name="port">1389<>61616</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/ldap-realmactivemq/1.1-4108062/car" load="false"/>
    <module name="org.apache.geronimo.configs/tomcat/1.1-4108062/car">
        <gbean name="TomcatEngineTomcatResources"/>
            <reference<gbean name="TomcatValveChainTomcatWebConnector" />
             </gbean><attribute name="host">0.0.0.0</attribute>
        <!-- To enable accesslogging change<attribute the loadname="falseport">8080</attribute>
 below to load="true" -->
        <gbean<attribute name="FirstValve" load="false"></gbean>

redirectPort">8443</attribute>
        <gbean name="TomcatResources"/></gbean>
        <gbean name="TomcatWebConnectorTomcatAJPConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8080<>8009</attribute>
            <attribute name="redirectPort">8443</attribute>
        </gbean>
        <gbean name="TomcatAJPConnectorTomcatWebSSLConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8009</attribute>
            <attribute name="redirectPort">8443</attribute>
        </gbean>
        <gbean name="TomcatWebSSLConnector">
            <attribute name="host">0.0.0.0</attribute>org.apache.geronimo.configs/tomcat/1.2/car?ServiceModule=org.apache.geronimo.configs/tomcat/1.2/car,j2eeType=GBean,name=TomcatWebContainer">
            <attribute name="portcatalinaHome">8443<>var/catalina</attribute>
        </gbean>
    </module>
    <!-- n.b. be sure the gbean deployer is explicitly loaded before j2ee-deployer so that defaultEnvironment
    overrides work properly -->
    <module name="geronimo/geronimo-gbean-deployer/1.1-410806<module name="org.apache.geronimo.configs/geronimo-gbean-deployer/1.2/car"/>
    <module name="org.apache.geronimo.configs/j2ee-deployer/1.1-4108062/car">
        <gbean name="WebBuilder">
            <attribute name="defaultNamespace">http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1<2</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/openejbconnector-deployer/1.1-4108062/car"/>
    <module    <gbean name="EJBBuilder"condition="java.is1_5" name="org.apache.geronimo.configs/persistence-jpa10-deployer/1.2/car"/>
    <module name="org.apache.geronimo.configs/openejb-deployer/1.2/car">
       <attribute <gbean name="listenerEJBBuilder">?name=TomcatWebContainer</attribute>
        </gbean>
    </module>
<attribute name="listener">?name=TomcatWebContainer</attribute>
       <module name="geronimo/client-deployer/1.1-410806/car"/>
    <module<reference name="geronimo/axis-deployer/1.1-410806/car"/ServiceBuilders">
    <module name="geronimo/javamail/1.1-410806/car" load="false">
           <gbean name="SMTPTransport">
 <pattern>
              <attribute name="host">localhost</attribute>
     <name>GBeanBuilder</name>
       <attribute name="port">25</attribute>
        </gbean>pattern>
      </module>

     <module name="geronimo/sharedlib/1.1-410806/car">
     <pattern>
     <gbean name="SharedLib">
              <attribute name="classesDirs">var/shared/classes</attribute>
 <name>PersistenceUnitBuilder</name>
               <attribute name="libDirs">var/shared/lib</attribute> </pattern>
        </gbean>
    </module>reference>

      <module name="geronimo/tomcat  </gbean>
    </module>
    <module load="false" name="org.apache.geronimo.configs/openejb-corba-deployer/1.1-4108062/car"/>
    <module name="org.apache.geronimo.configs/welcomeclient-tomcatdeployer/1.1-4108062/car"/>
    <module name="org.apache.geronimo.configs/webconsoleaxis-tomcatdeployer/1.1-4108062/car"/>
    <module load="false" name="org.apache.geronimo.configs/uddi-tomcatjavamail/1.1-4108062/car" load="false"/>
    <module    <gbean name="geronimo/remote-deploy-tomcat/1.1-410806/car" />
SMTPTransport">
      <module      <attribute name="host"geronimo/hot-deployer/1.1-410806/car" />
</attributes>

In order to change the default port, scroll down to the code that looks like below in the config.xml file and change the port number.

>localhost</attribute>
            <attribute name="port">25</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/sharedlib/1.2/car">
        <gbean name="SharedLib">
            <attribute name="classesDirs">var/shared/classes</attribute>
            <attribute name="libDirs">var/shared/lib</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/tomcat-deployer/1.2/car"/>
    <module name="org.apache.geronimo.configs/welcome-tomcat/1.2/car"/>
    <module name="org.apache.geronimo.configs/webconsole-tomcat/1.2/car"/>
    <module load="false" name="org.apache.geronimo.configs/uddi-tomcat/1.2/car"/>
    <module name="org.apache.geronimo.configs/remote-deploy-tomcat/1.2/car"/>
    <module name="org.apache.geronimo.configs/hot-deployer/1.2/car"/>
    <module load="false" name="org.apache.geronimo.configs/ca-helper-tomcat/1.2/car"/>
    <module load="false" name="sample.applications/HelloWorldApp/1.1/war"/>
    <module name="sample.applications/HelloWorldApp/1.2/war"/>
</attributes>

Here are two excerpts from the config.xml file, one for Tomcat and one for Jetty. These excerpts show the entire section where the listeners are defined, we have just replaced the standard 8080 with an arbitrary port, 9000 in this case.

Code Block
xml
xml
borderStylesolid
titleExcerpt from config.xml - Tomcat

    <module name="org.apache.geronimo.configs/tomcat/1.2/car">
        <gbean name="TomcatResources"/>
        <gbean name="TomcatWebConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">9000</attribute>
            <attribute name="redirectPort">8443</attribute>
        </gbean>
        <gbean name="TomcatAJPConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8009</attribute>
            <attribute name="redirectPort">8443</attribute>
        </gbean>
        <gbean name="TomcatWebSSLConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8443</attribute>
        </gbean>
        <gbean name="org.apache.geronimo.configs/tomcat/1.2/car?ServiceModule=org.apache.geronimo.configs/tomcat/1.2/car,j2eeType=GBean,name=TomcatWebContainer">
            <attribute name="catalinaHome">var/catalina</attribute>
        </gbean>
    </module>
Code Block
xml
xml
borderStylesolid
titleExcerpt from config.xml - Jetty

    <module name="org.apache.geronimo.configs/jetty/1.2/car">
        <gbean name="JettyWebConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">9000</attribute>
            <attribute name="redirectPort">8443</attribute>
        </gbean>
        <gbean name="JettySSLConnector
Code Block
xmlxml
borderStylesolid
titleExcerpt from config.xml - Tomcat

<gbean
	load="false" name="FirstValve"/>
<gbean name="TomcatResources"/>
    <gbean name="TomcatWebConnector">
            <attribute name="host">0.0.0.0</attribute>
      <attribute name="port">9000</attribute>
       <attribute name="redirectPortport">8443</attribute>
        </gbean>
Code Block
xmlxml
borderStylesolid
titleExcerpt from config.xml - Jetty

<module name="geronimo/activemq/1.1/car"/>
<module name="geronimo/jetty/1.1/car">
        <gbean name="JettyWebConnectorJettyAJP13Connector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">9000<>8009</attribute>
<attribute name="redirectPort">8443</attribute>
        </gbean>
    </module>

Save the file and after starting restart the Geronimo Server, server, with the new configuration loaded point your web browser to the new port.

http://localhost:9000/console

...