sk165938 - How to configure persistent environment variables on the Management Server

How to configure persistent environment variables on the Management Server

Product

Multi-Domain Security Management, Security Management

Version

R80.20 (EOS), R80.30 (EOS), R80.40 (EOS), R81 (EOS), R81.10 (EOS), R81.20, R82

OS

Gaia

Last Modified

2025-05-14

Solution

Environment variables might not survive upgrades, and this may cause old issues to reoccur.

This problem was fixed. The fix is included in:

Syntax to set an environment variable:

[Expert@HostName]# $MDS_FWDIR/scripts/reload_env_vars.sh -e "<VARIABLE>=<VALUE>"

Example:

[Expert@HostName]# $MDS_FWDIR/scripts/reload_env_vars.sh -e "NGM_QUERY_LIVENESS_OPTIMIZER=1"
[Expert@HostName]# $MDS_FWDIR/scripts/override_server_setting.sh -e <VARIABLE> <VALUE>

Example:

[Expert@HostName]# $MDS_FWDIR/scripts/override_server_setting.sh -e NGM_QUERY_LIVENESS_OPTIMIZER 1

Syntax to unset an environment variable:

[Expert@HostName]# $MDS_FWDIR/scripts/reload_env_vars.sh -u <VARIABLE>

Example:

[Expert@HostName]# $MDS_FWDIR/scripts/reload_env_vars.sh -u "NGM_QUERY_LIVENESS_OPTIMIZER"
    [Expert@HostName]# $MDS_FWDIR/scripts/override_server_setting.sh -u <VARIABLE>
    ```
    Example:

```bash
    [Expert@HostName]# $MDS_FWDIR/scripts/override_server_setting.sh -u "NGM_QUERY_LIVENESS_OPTIMIZER"
    ```

- For all lower Management Server versions:
    1. Back up the current `$MDS_FWDIR/conf/cpmEnvVars.conf` file:
       ```bash
       [Expert@HostName]# cp -v $MDS_FWDIR/conf/cpmEnvVars.conf{,_BKP}
       ```
    2. Edit the current `$MDS_FWDIR/conf/cpmEnvVars.conf` file:
       ```bash
       [Expert@HostName]# vi $MDS_FWDIR/conf/cpmEnvVars.conf
       ```
    3. Remove the line that contains the environment variable.
    4. Save the changes in the file and exit Vi editor.

Notes:
- There is no validation for the values you configure.
- For the variables to survive upgrade you must have this tool on the machine before the upgrade.

## Article Properties

- **Access Level:** General
- **Status:** Approved
- **Date Created:** 2020-03-30
- **Last Modified:** 2025-05-14