The guidelines shown here is for adding or setting your user's environment variable in a supported RHEL/CentOS Linux distribution using the bash shell.
Setting environment variable to current terminal session
Notes
- These settings are applied to the current terminal/shell session.
- Once the current terminal window is terminated, the variables will be erased and will have to be entered again on the new terminal/shell session.
- The command shown in this section can be applied into your user's shell profile to permanently add the variables to whenever you open terminal/shell session.
Ansys licensing environment variable
- Ansys license manager is running on server, "licserver01" on TCP port 1055 (default)
export ANSYSLMD_LICENSE_FILE=1055@licserver01
- AnsysLM is running on Triad Redundant Servers, "licserver01", "licserver02", and "licserver03" on default port, 1055.
export ANSYSLMD_LICENSE_FILE=1055@licserver01:1055@licserver02:1055@licserver03
Ansys Lumerical API and bundled Python 3 path
Notes
- Change the Lumerical path according to your installation's path.
- If you will be using your own Python 3 installation remove our bundled Python 3 when setting the PATH (highlighted below).
export PATH=/{lumerical_install_path}/bin:/{lumerical_install_path}/python/bin:$PATH
export PYTHONPATH=/{lumerical_install_path}/api/python:$PYTHONPATH
Adding environment variable permanently to bash shell
The examples above can be appended into your shell environment permanently. The example shown below shows the process for the 'bash' shell. Different shell will require different file and syntax.
- Edit your ".bashrc" using a text editor like "vi", "vim" or "nano".
cd $HOME
vi .bashrc - Append the variables into your ".bashrc".
Example:
...
# Ansys licensing variable using default TCP port 1055
export ANSYSLMD_LICENSE_FILE=1055@{your_server}
# Ansys Optics and bundled Python3 installation path for the current release
export PATH=/{lumerical_install_path}/bin:/{lumerical_install_path}/python/bin:$PATH
# Ansys Optics API module install path for the current release
export PYTHONPATH=/{lumerical_install_path}/api/python:$PYTHONPATH