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 PingGateway.
-
By adding environment variables in
$HOME/.openig/bin/env.sh
, where$HOME/.openig
is the instance directory. After changingenv.sh
, restart PingGateway to load the new configuration.
Start PingGateway with a customized router scan interval
By default, PingGateway scans every 10 seconds for changes to the route configuration files. Any changes to the files are automatically loaded into the configuration without restarting PingGateway. Learn more about the router scan interval in Router.
The following example overwrites the default value of the Router scan interval to 2 seconds when you start up PingGateway:
-
Linux
-
Windows
$ IG_ROUTER_SCAN_INTERVAL='2 seconds' /path/to/identity-gateway-2024.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
PingGateway provides the following environment variables for Java runtime options:
- IG_OPTS
-
(Optional) Java runtime options for PingGateway and its startup process, such as JVM memory sizing options.
Include all options that aren’t 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 PingGateway include all options that are shared by the
start
andstop
script.