...
Note |
---|
For both Geronimo javaee6 and minimal release bundles, you can only safely run multiple instance by completely copying the server folder to another, and start a 2nd instance after changing its portOffset value. For the Geronimo javaee6 release bundles, a patch applied on September 23, 2011 (See GERONIMO-5987) fixes an issue with ActiveMQ that previously prevented Geronimo javaee6 from running multiple instances. Though multiple instances of Geronimo javaee6 can now be started, it is still undergoing testing in scenarios following this documentation. And several issues are identified in GERONIMO-6174 and GERONIMO-6175. Refer to GERONIMO-5987 for proper startup procedures to work around an ActiveMQ issue. Follow GERONIMO-6270 for the progress on re-enabling multiple instance support. For the Geronimo minimal release bundles, though Though it is possible to startup multiple instances of the Geronimo minimal release, the known issues to do so safely are shared with those identified in GERONIMO-6174, GERONIMO-6175, and GERONIMO-61756270. |
Excerpt |
---|
It is possible to run multiple instances of Geronimo on the same machine. |
<geronimo_home>
, the directory where you installed Geronimo. These are read-only....
- 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
, andrepository
to each instance directory - Modify the
gservN/var/config/config-substitutions.properties
file for each Geronimo instance changing thePortOffset
. We'll set thePortOffset
forgserv1
to 100 and thePortOffset
forgserv2
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 borderStyle solid #!/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} GHOMEexport GERONIMO_HOME=/opt/geronimo3 GVIRT=gserv1 export GERONIMO_SERVER=${GERONIMO_HOME}/gserv1 export GERONIMO_OPTS=-Dorg.apache.geronimo.server.namedir=${GVIRTGERONIMO_SERVER} # Normal startuostartup ${GHOMEGERONIMO_HOME}/bin/startup # Interactive startup #${GHOMEGERONIMO_HOME}/bin/geronimo run
/opt/geronimo3/gserv2/start.sh
No Format borderStyle solid #!/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} GHOMEexport GERONIMO_HOME=/opt/geronimo3 GVIRT=export GERONIMO_SERVER=${GERONIMO_HOME}/gserv2 export GERONIMO_OPTS=-Dorg.apache.geronimo.server.namedir=${GVIRTGERONIMO_SERVER} # Normal startuo ${GHOMEGERONIMO_HOME}/bin/startup # Interactive startup #${GHOMEGERONIMO_HOME}/bin/geronimo run
- On linux, make the start script is executable with chmod: chmod 755 start.sh
- Create the Geronimo instance directories as
- Your Geronimo installation file structure should look something similar to this:
No Format borderStyle solid /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
...