7、配置用户环境变量
su - grid
#grid用户的环境变量如下:
vim~/.bash_profile
PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
umask 022
export TMP=/tmp
exportLANG=en_US
export TMPDIR=$TMP
exportORACLE_HOSTNAME=oraclenode1
ORACLE_SID=+ASM1;export ORACLE_SID
ORACLE_TERM=xterm;export ORACLE_TERM
ORACLE_BASE=/data/oracle/app/grid;export ORACLE_BASE
ORACLE_HOME=/data/oracle/app/12.1.0.2/grid;export ORACLE_HOME
NLS_DATE_FORMAT="yyyy-mm-ddHH24:MI:SS"; export NLS_DATE_FORMAT
PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin;export PATH
THREADS_FLAG=native;export THREADS_FLAG
if [ $USER ="oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ];then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
su - oracle
#oracle用户的环境变量如下:
vim~/.bash_profile
PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
export TMP=/tmp
exportLANG=en_US
exportTMPDIR=$TMP
export ORACLE_HOSTNAME=oraclenode1
exportORACLE_UNQNAME=orcldb
ORACLE_BASE=/data/oracle/app/oracle;export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1;export ORACLE_HOME
ORACLE_SID=orcldb1;export ORACLE_SID
ORACLE_TERM=xterm;export ORACLE_TERM
NLS_DATE_FORMAT="yyyy-mm-ddHH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;exportNLS_LANG
PATH=.:$PATH:$HOME/bin:$ORACLE_BASE/product/12.1.0.2/db_1/bin:$ORACLE_HOME/bin;export PATH
THREADS_FLAG=native;export THREADS_FLAG
if [ $USER ="oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ];then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
#节点二:
su - grid
#grid的环境变量
vim~./bash_profile
PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
umask 022
export TMP=/tmp
exportLANG=en_US
exportTMPDIR=$TMP
exportORACLE_HOSTNAME=oraclenode2
ORACLE_SID=+ASM2;export ORACLE_SID
ORACLE_TERM=xterm;export ORACLE_TERM
ORACLE_BASE=/data/oracle/app/grid;export ORACLE_BASE
ORACLE_HOME=/data/oracle/app/12.1.0.2/grid;export ORACLE_HOME
NLS_DATE_FORMAT="yyyy-mm-ddHH24:MI:SS"; export NLS_DATE_FORMAT
PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin;export PATH
THREADS_FLAG=native;export THREADS_FLAG
if [ $USER ="oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ];then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
su - oracle
vim~/.bash_profile
PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
export TMP=/tmp
exportLANG=en_US
exportTMPDIR=$TMP
exportORACLE_HOSTNAME=oraclenode2
exportORACLE_UNQNAME=orcldb
ORACLE_BASE=/data/oracle/app/oracle;export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1;export ORACLE_HOME
ORACLE_SID=orcldb2;export ORACLE_SID
ORACLE_TERM=xterm;export ORACLE_TERM
NLS_DATE_FORMAT="yyyy-mm-ddHH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;exportNLS_LANG
PATH=.:$PATH:$HOME/bin:$ORACLE_BASE/product/12.1.0.2/db_1/bin:$ORACLE_HOME/bin;export PATH
THREADS_FLAG=native;export THREADS_FLAG
if [ $USER ="oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ];then
ulimit -p 16384
ulimit -n 65536
else
ulimit-u 16384 -n 65536
fi
umask 022
fi
CentOS 7.2安装Oracle 12c RAC(2)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:https://www.heiqu.com/e5ba2aa44d389c52636ef4204cd76e21.html