profile 2種不同的設定

tom_xieym發表於2011-08-17

1.提示選擇
# .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

PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:
BASH_ENV=$HOME/.bashrc
export PATH BASH_ENV
unset USERNAME

# Set Oracle Environment
ORACLE_HOME=/u01/product/oracle;export ORACLE_HOME
ORACLE_SID=wfdb;export ORACLE_SID
ORACLE_OWNER=oracle;export ORACLE_OWNER
ORACLE_BASE=/u01/product;export ORACLE_BASE
ORACLE_TERM=vt100;export ORACLE_TERM
#NLS_LANG='traditional chinese_taiwan'.ZHT16BIG5;export NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
set -u
#PS1=`hostname`'$';export PS1
PS1=`hostname`'$';export PS1
EDITOR=/bin/vi; export EDITOR
JAVA_HOME=/usr/local/java;export JAVA_HOME
ORA_NLS33=/u01/product/oracle/ocommon/nls/admin/data;export ORA_NLS33
CLASSPATH=/u01/product/oracle/jdbc/lib/classesl11.zip:/usr/local/java;
export DISPLAY=127.0.0.1:0.0
export LD_ASSUME_KERNEL=2.4.19
PATH=$ORACLE_HOME/bin:$JAVA_HOME/bin:$PATH:.;export PATH
alias ll='ls -l';
alias ls='ls --color';
alias his='history';
#. /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
#rq=`date`
#echo "please enter your name:"
#read name
#echo "hello $name, now time is $rq, welcome to linux7.1 system, please shutdown the windows when left,thank you."

#echo "#"
#echo "#"
#echo "#"

echo "please choose a oracle sid: 1):wfdb 2):ultimus default:wfdb"
  read ans
  case $ans in
1)
ORACLE_SID=wfdb; export ORACLE_SID;;
2)
ORACLE_SID=ultimus; export ORACLE_SID;;
#3)
#ORACLE_SID=tpctest; export ORACLE_SID;;
*)
ORACLE_SID=wfdb; export ORACLE_SID;;
*)
esac 

2.就一種方式
# .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

# Set Oracle Environment
ORACLE_HOME=/u01/product/oracle;export ORACLE_HOME
ORACLE_SID=eservice;export ORACLE_SID
ORACLE_OWNER=oracle;export ORACLE_OWNER
ORACLE_BASE=/u01/product;export ORACLE_BASE
ORACLE_TERM=vt100;export ORACLE_TERM
#NLS_LANG='traditional chinese_taiwan'.ZHT16BIG5;export NLS_LANG
NLS_LANG=american_america.AL32UTF8;export NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH

set -u
PS1=`hostname`'$';export PS1
EDITOR=/bin/vi; export EDITOR
JAVA_HOME=/usr/local/java;export JAVA_HOME
ORA_NLS33=/u01/product/oracle/ocommon/nls/admin/data;export ORA_NLS33
CLASSPATH=/u01/product/oracle/jdbc/lib/classesl11.zip:/usr/local/java;
export DISPLAY=127.0.0.1:0.0
export LD_ASSUME_KERNEL=2.6.9
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$JAVA_HOME/bin:$PATH:.;export PATH
alias ll='ls -l';
alias ls='ls --color';
alias his='history';
umask 022

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25850100/viewspace-705095/,如需轉載,請註明出處,否則將追究法律責任。

相關文章