Configure environment variables

Configure Oracle environment variables

  1. Switch to the Oracle account.

su - oracle

  1. Modify the .bash_profile file.

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/db

export ORACLE_SID=orcl1 # Make sure this value is unique among the nodes.

export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

export DISPLAY=172.20.176.207:0.0

172.20.176.207 is the local PC's IP address. It will be used in Grid installation, Oracle installation, and testing.

  1. Validate the configuration.

source .bash_profile

Configure Grid environment variables

  1. Switch to the Grid account.

su - grid

  1. Modify the .bash_profile file.

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=/u01/app/12.2.0/grid

export ORACLE_SID=+ASM1 # Make sure this value is unique among the nodes.

export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

export TNS_ADMIN=$ORACLE_HOME/network/admin

export DISPLAY=172.20.176.207:0.0

172.20.176.207 is the local PC's IP address.

  1. Validate the configuration.

source .bash_profile