Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updating to reflect changes to procedures for creating multiple repositories, and indicating that a second repository for each Geronimo instance is recommended.

...

These are also read-write but are not part of the minimally necessary directories and files for running a Geronimo instance, but may be desired. The deploy and repository directories will be automatically created when you start Geronimo if it does they do not already exist.

  • repository (this is under <geronimo_home>/<instance_name>, and is not the same as the primary shared repository)
  • deploy
  • hotbundles

...

  1. Create a directory foo under <geronimo_home>.
  2. Copy var and etc directories to foo. You can use the command deploy:new-server-instance to help you with this step.
  3. Optionally Recommended: create foo/repository and set it up as a second repository for the Geronimo instance. See Configuring multiple Repositories
  4. Edit foo/var/config/config-substitutions.properties and change the portOffset. Try using any integers such as 1, 2, 10, 20, 30.. for various instances.

...

  • On a Windows system: set GERONIMO_OPTS ="-Dorg.apache.geronimo.server.name=foo"
  • On a Unix-like system: export GERONIMO_OPTS="-Dorg.apache.geronimo.server.name=foo"
  1. Start the server using startup
    No Format
    borderStylesolid
    <geronimo_home>/bin/startup
    
  2. To shutdown this instance, use the port number of RMI Naming port (default 1099). For the new instance foo, the port number should be 1099 plus portOffset specified in foo/var/config/config-substitutions.properties.
    No Format
    borderStylesolid
    <geronimo_home>/bin/shutdown --port <port<RMI_port_num>
    
  3. To deploy applications to this instance use the port number of RMI Naming port
  • This deploys to the primary Geronimo repository
    No Format
    borderStylesolid
    
    <geronimo_home>/bin/deploy --port <RMI_port

...

  • _num> deploy <applications>
    
  • This deploys to a secondary Geronimo repository exclusive to the Geronimo server defined in org.apache.geronimo.server.name=foo . See Configuring multiple Repositories for more detailed instructions.
    No Format
    borderStylesolid
    
    <geronimo_home>/bin/deploy --port <RMI_port_num> deploy --targets <foo_repo_name> <applications>
    

The Administrative Console can also be used for all these operations. Connect to an instance by using the right HTTP port (default 8080).

...

  • First download the Geronimo bundle distribution
  • Determine what you want GERONIMO_HOME to be. We will use /opt/geronimo3 for this example.
  • Unpack the Geronimo bundle, and move the unpacked directory to /opt/geronimo3
  • We'll create two Geronimo instances named gserv1 and gserv2
    • Create the Geronimo instance directories as /opt/geronimo3/gserv1 and /opt/geronimo3/gserv2
    • Copy the directories var, etc, and repository to each instance directory and etc to each instance directory
    • Create a repository directory within each instance directory and set it up as a second repository for the corresponding Geronimo instance. See Configuring multiple Repositories
    • Modify the gservN/var/config/config-substitutions.properties file for each Geronimo instance changing the PortOffset. We'll set the PortOffset for gserv1 to 100 and the PortOffset for gserv2 to 200 for our example.
    • Create a start script in each Geronimo instance directory to make it easier to start each instance
      • /opt/geronimo3/gserv1/start.sh
        No Format
        borderStylesolid
        #!/bin/bash
        # Geronimo start script
        # instance: gserv1
        
        # Uncomment this to explicitly set Geronimo's runtime Java
        #JAVA_HOME=/usr/jdk1.6.0_25
        #PATH=${JAVA_HOME}/bin:${PATH}
        
        export GERONIMO_HOME=/opt/geronimo3
        export GERONIMO_SERVER=${GERONIMO_HOME}/gserv1
        export GERONIMO_OPTS=-Dorg.apache.geronimo.server.dir=${GERONIMO_SERVER}
        cd ${GERONIMO_SERVER}
        
        # Normal startup
        ${GERONIMO_HOME}/bin/startup
        # Interactive startup
        #${GERONIMO_HOME}/bin/geronimo run
        
      • /opt/geronimo3/gserv2/start.sh
        No Format
        borderStylesolid
        #!/bin/bash
        # Geronimo start script
        # instance: gserv2
        
        # Uncomment this to explicitly set Geronimo's runtime Java
        #JAVA_HOME=/usr/jdk1.6.0_25
        #PATH=${JAVA_HOME}/bin:${PATH}
        
        export GERONIMO_HOME=/opt/geronimo3
        export GERONIMO_SERVER=${GERONIMO_HOME}/gserv2
        export GERONIMO_OPTS=-Dorg.apache.geronimo.server.dir=${GERONIMO_SERVER}
        cd ${GERONIMO_SERVER}
        
        # Normal startuo
        ${GERONIMO_HOME}/bin/startup
        # Interactive startup
        #${GERONIMO_HOME}/bin/geronimo run
        
    • On linux, make the start script is executable with chmod: chmod 755 start.sh
  • Your Geronimo installation file structure should look something similar to this:
    No Format
    borderStylesolid
    /opt/geronimo3
    |-- LICENSE
    |-- NOTICE
    |-- README.txt
    |-- RELEASE_NOTES-3.0-SNAPSHOT.txt
    |-- bin
    |-- deploy
    |-- etc
    |-- gserv1
    |   |-- etc
    |   |-- repository
    |   |-- start.sh
    |   `-- var
    |-- gserv2
    |   |-- etc
    |   |-- repository
    |   |-- start.sh
    |   `-- var
    |-- hotbundles
    |-- jsr88
    |-- lib
    |-- repository
    |-- schema
    `-- var
    
  • Finally you can start up each instance by executing their associated start script you just created in the previous step

...