为db2用户添加db2命令及jdk环境变量配置

AIX系统:
db2inst用户 在/home/db2inst/.profile文件下新增以下代码(包括用户环境变量配置,具体路径取决于jdk安装的路径)

PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/usr/java6/jre/bin:/usr/java6/bin:.

export PATH

if [ -s "$MAIL" ] # This is at Shell startup. In normal
then echo "$MAILMSG" # operation, the Shell checks
fi # periodically.

# The following three lines have been added by IBM DB2 instance utilities.
if [ -f /home/db2inst1/sqllib/db2profile ]; then
. /home/db2inst1/sqllib/db2profile
fi


Linux系统:
db2inst1用户 在home/db2inst1/.bashrc文件下新增以下代码(包括用户环境变量配置,具体路径取决于jdk安装的路径)

PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/usr/java6/jre/bin:/usr/java6/bin:.

export PATH

if [ -s "$MAIL" ] # This is at Shell startup. In normal
then echo "$MAILMSG" # operation, the Shell checks
fi # periodically.

# The following three lines have been added by IBM DB2 instance utilities.
if [ -f /home/db2inst1/sqllib/db2profile ]; then
. /home/db2inst1/sqllib/db2profile
fi

posted on 2017-07-14 09:51  搬起地球的小蚂蚁  阅读(1776)  评论(0编辑  收藏  举报