AIX5.3设置Oracle .profile环境变量,注销/重启后环境变量丢失的解决方法
本帖最后由 dcbakkk 于 2014-2-19 17:28 编辑AIX5.3设置Oracle 11g R2 环境变量 (/home/oracle/.profile)如下:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db
export ORACLE_SID=orcl
export TNS_ADMIN=$ORACLE_HOME/network/admin
PATH=$ORACLE_HOME/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
export PATH
if [ -s "$MAIL" ] # This is at Shell startup.In normal
then echo "$MAILMSG" # operation, the Shell checks
fi # periodically.
然后执行
bash-3.2$ source .profile
退出Xbrowser(AIX安装了CDE)或者Xshell之后再ssh进入AIX 执行
bash-3.2$ echo $ORACLE_HOME执行结果没有环境变量显示,又需要重新source .profile
这里如何让AIX在账户登录时自动source 环境变量啊?
解决方法:
编辑 /home/oracle/.dtprofile
#
#If $HOME/.profile (.login) has been edited as described above, uncomment
#the following line.
#
DTSOURCEPROFILE=true #(取消注释)
Solaris也需要修改DTSOURCEPROFILE=true
页:
[1]