Set up environment variables and system properties
Configure environment variables and system properties as follows:
-
By adding environment variables on the command line when you start IG.
-
By adding environment variables in
$HOME/.openig/bin/env.sh
, where$HOME/.openig
is the instance directory. After changingenv.sh
, restart IG to load the new configuration.
Start IG with a customized router scan interval
By default, IG scans every 10 seconds for changes to the route configuration files. Any changes to the files are automatically loaded into the configuration without restarting IG. For more information about the router scan interval, refer to Router.
The following example overwrites the default value of the Router scan interval to two seconds when you start up IG:
-
Linux
-
Windows
$ IG_ROUTER_SCAN_INTERVAL='2 seconds' /path/to/identity-gateway-2023.11.0/bin/start.sh
C:\IG_ROUTER_SCAN_INTERVAL='2 seconds'
C:\start.bat %appdata%\OpenIG
Define environment variables for startup, runtime, and stop
IG provides the following environment variables for Java runtime options:
- IG_OPTS
-
(Optional) Java runtime options for IG and its startup process, such as JVM memory sizing options.
Include all options that are not shared with the
stop
script.The following example specifies environment variables in the
env.sh
file to customize JVM options and keys:-
Linux
-
Windows
# Specify JVM options JVM_OPTS="-Xms256m -Xmx2048m" # Specify the DH key size for stronger ephemeral DH keys, and to protect against weak keys JSSE_OPTS="-Djdk.tls.ephemeralDHKeySize=2048" # Wrap them up into the IG_OPTS environment variable export IG_OPTS="${IG_OPTS} ${JVM_OPTS} ${JSSE_OPTS}"
C:\set "JVM_OPTS=-Xms256m -Xmx2048m" C:\set "JSSE_OPTS=-Djdk.tls.ephemeralDHKeySize=2048" C:\set "IG_OPTS=%IG_OPTS% %JVM_OPTS% %JSSE_OPTS%"
-
- JAVA_OPTS
-
(Optional) Java runtime options for IG include all options that are shared by the
start
andstop
script.