Difference: SettingEnvironmentVariables (3 vs. 4)

Revision 42014-06-20 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXEnvironmentVariables"

Setting Environment Variables

Changed:
<
<
APPX offers five levels at which environment variables may be set:
>
>
APPX offers six levels at which environment variables may be set:
 
Line: 10 to 10
  Specific Environment Variables are documented in detail at Environment Variables List.
Deleted:
<
<

 

Global OS Environment Variables

The "classic" and most general place to set environment variables is at the OS level. In Windows, they are set in the autoexec.bat or System Environment on APPX/Client machine. In UNIX, they are typically set in /etc/profile

Line: 22 to 17
 
  • Familiar to APPX veterans
  • Convenient if you have a mixture of Telnet and APPX/Client Users
  • Easy to verify what the values are by "set | more"

DISADVANTAGES:

  • variables tend to end up scattered around
  • using a mixture of OS and appx.env variables leaves you with variable settings in any of many different places. This can be hard to debug!
  • for non-APPX/Client users, user must log out and log back in again before changes in variable values can take effect
  • for APPX/Client users, the WinAppxD System Service must be stopped and restarted, or the NT must be rebooted, before changes in variable values can take effect
  • /etc/profile, NT system environment settings, and shared autoexec.bat files.
  • convenient if you have a mix of Telnet and APPX/Client users.
  • easy to verify variable values with "set |more" at a command prompt.
Deleted:
<
<

 

Per-user OS Environment Variables

  • UNIX's ~/.profile, or Windows non-shared autoexec.bat

Line: 37 to 28
  Also overrides any global appx.env settings.
Deleted:
<
<

 

Startup script or batch files

The next technique for setting APPX-related environment variables, is to do so directly in the script or batch file invoked by system users to start APPX, or invoked by the system to start AppxD.

Line: 55 to 41
 
  • site administrators should be careful to back up this file prior to an APPX upgrade in case a new version includes an updated template start-appxd.sh file

AppxD startup script (UNIX only)

  • only affects APPX/Client users
  • similar to appx.env, allows all variable settings in one file
Deleted:
<
<


 

Global appx.env Environment Variables

The recommended method for setting environment variables is in Global appx.env.

  • $APPXPATH/appx.env
  • convenient if you have a mix of Telnet and APPX/Client users
  • all variables in a single file
Deleted:
<
<


 

Per-user appx.env Environment Variables

Per-user appx.env is not available for APPX/Client users.

Line: 71 to 55
 Overrides any OS settings. Also overrides any global appx.env settings.
  • ~/appx.env or C:\appx.env
  • not applicable for APPX/Client
  • for variables set on a per-user basis

Changed:
<
<


>
>

Setting Environment Variables on the Command line

You can also set environment variables from the command line. Just prefix the variable with 2 dashes as follows:

appx --APPX_SQL_LOG=c:\logs\appx.log --APPX_CMD_LOG=0xFFFFFFFF

This will set APPX_SQL_LOG and APPX_CMD_LOG for the duration of this session only.

 

Gotchas

Tech support sees various issues related to environment variables come up on a regular basis. Since forewarned is forearmed, here they are.

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback