[리눅스]멀티 환경변수 case 문 이용
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
# User specific environment and startup programs
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/1020/db_1
export ORA_CRS_HOME=$ORACLE_BASE/product/1020/crs_1
export ORACLE_PATH=$ORACLE_BASE/common/oracle/sq1:.:$ORACLE_HOME/rdbms/admin
# Each RAC node must have a unique ORACLE_SID. (i.e. orcl1, orcl2, ...)
#export ORACLE_SID=OTPDB
export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS10=$ORACLE_HOME/nls/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp
export DISPLAY=172.16.2.235:0.0
export ORACLE_OWNER=oracle
#export NLS_LANG=AMERICAN_AMERICA.KO16KSC5601
#export NLS_LANG=AMERICAN_AMERICA.US7ASCII
#export NLS_LANG=KOREAN_KOREA.KO16KSC5601
#export LANG=C
# prompt
PS1='[${ORACLE_SID}]'`hostname`':$PWD> '
# alias set
alias dba='sqlplus "/as sysdba"'
alias crs='/oracle/app/oracle/product/crs/bin/crs_stat -t'
umask 022
set -o vi
stty erase
export EDITOR=vi
#ORACLE_SID
echo "Choose ORACLE_SID (ORACLE Database Name)"
echo
echo "1) TEST OTPDB"
echo "2) TEST RADB"
echo
echo "[1번이나 2번을 선택해주세요]"
read insNumber
case ${insNumber} in
1)
export ORACLE_SID=OTPDB
export NLS_LANG=AMERICAN_AMERICA.US7ASCII
;;
2)
export ORACLE_SID=TESTRA
export NLS_LANG=AMERICAN_AMERICA.KO16KSC5601
;;
*)
echo "Not Choosed ORACLE_SID"
;;
esac
'02.서버-Linux' 카테고리의 다른 글
[리눅스]CentOS virbr0 NAT disable (0) | 2013.05.08 |
---|---|
[리눅스]Find perm 옵션 (0) | 2013.04.23 |
[리눅스]RPM Failed dependencies (0) | 2013.03.28 |
[리눅스]NDD & TCPDUMP (0) | 2013.03.25 |
[리눅스]SoftWare RAID10 (0) | 2013.03.18 |