There are 2 scripts that involve setting environment variables. They are called the default script and the customization script in this document.
In Tomcat bundle and for Linux, they are:
$PLATFORM_TOMCAT_HOME/bin/setenv.sh
which is defaulted in the eXo Platform package.
$PLATFORM_TOMCAT_HOME/bin/setenv-customize.sh
which will be created by yourself, as explained later.
Their Windows versions are $PLATFORM_TOMCAT_HOME/bin/setenv.bat
and $PLATFORM_TOMCAT_HOME/bin/setenv-customize.bat
.
Except their syntax, .sh
and .bat
versions are the same.
In JBoss, the Linux scripts are:
$PLATFORM_JBOSS_HOME/bin/standalone.conf
which is defaulted in the eXo Platform package.
$PLATFORM_JBOSS_HOME/bin/standalone-customize.conf
which will be created by yourself, as explained later.
The Windows versions are $PLATFORM_JBOSS_HOME/bin/standalone.conf.bat
and $PLATFORM_JBOSS_HOME/bin/standalone-customize.conf.bat
.
Variables in the customization script, if they exist, override variables in the default script.
If the customization script does not exist, variables in the default script take effect.
For safety, you should not modify the default script. Any customized variable should be organized in the customization script.
Rename a file in bin
folder, as below:
For Tomcat in Linux: rename setenv-customize.sample.sh
to setenv-customize.sh
.
For Tomcat in Windows: rename setenv-customize.sample.bat
to setenv-customize.bat
.
For JBoss in Linux: rename standalone-customize.sample.conf
to standalone-customize.conf
.
For JBoss in Windows: rename standalone-customize.sample.conf.bat
to standalone-customize.conf.bat
.
Find the variable that you want to customize, uncomment it
(by removing '#' in the .sh
file or "REM" in the .bat
file) and edit its value.
Use # to comment out a line in .sh
, and REM in .bat
. To comment out a block:
In .sh
, use the pair of :<<LABEL and LABEL.
For example:
:<<old_configurations EXO_JVM_SIZE_MAX="1g" EXO_JVM_SIZE_MIN="1g" old_configurations
In .bat
, use the pair of GOTO LABEL and :LABEL.
For example:
GOTO old_configurations SET EXO_JVM_SIZE_MAX=1g SET EXO_JVM_SIZE_MIN=512m :old_configurations
In next sections, you will walk through Basic Customization and Advanced Customization.