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 a 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.
Adding Ansys licensing environment variable
- Ansys license manager is running on server, "vnrserver01" on TCP port 1055 (default)
export ANSYSLMD_LICENSE_FILE=1055@vnrserver01
- AnsysLM is running on Triad Redundant Servers, "vnrlicense01", "vnrserver02", and "vnrlicserver03" on default port, 1055.
export ANSYSLMD_LICENSE_FILE=1055@vnrlicense01,1055@vnrserver02,1055@vnrlicserver03
Adding Lumerical to PATH and PYTHONPATH
Example: adding the current version, [[ver]] of Lumerical using the default install path and the bundled Python3 provided by Lumerical.
Note: If you will be using your own installation of Python 3, add your Python 3 install path instead of our bundled Python 3.
export PATH=$PATH:/opt/lumerical/[[verpath]]/bin:/opt/lumerical/[[verpath]]/api/python:/opt/lumerical/[[verpath]]/python/bin
export PYTHONPATH=$PYTHONPATH:/opt/lumerical/[[verpath]]/api/python:/opt/lumerical/[[verpath]]/python/bin
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 - Add the corresponding command/variable as shown above into your ".bashrc" to add the Lumerical installation path into your PATH and PYTHONPATH or/and the Ansys licensing variable into your shell environment.
Example:
# .bashrc
...
# Ansys licensing variable using default TCP port 1055
export ANSYSLMD_LICENSE_FILE=1055@license_server
# Lumerical API and installation path for the current release
export PATH=$PATH:/opt/lumerical/[[verpath]]/bin:/opt/lumerical/[[verpath]]/api/python:/opt/lumerical/[[verpath]]/python/bin
export PYTHONPATH=$PYTHONPATH:/opt/lumerical/[[verpath]]/api/python:/opt/lumerical/[[verpath]]/python/bin