当前位置: 主页 > 操作系统 > Linux > linux下实现自动安装Oracle

linux下实现自动安装Oracle

时间:2009-12-22来源:互联网 点击:

sysctl -p &>/dev/null #Make the configured file come into effect immediately.

grep ‘soft nproc‘ /etc/security/limits.conf &>/dev/null
if [ "$?" -eq "1" ]
then
cat >> /etc/security/limits.conf <<EOF
soft nproc 2047
hard nproc 16384
soft nofile 1024
hard nofile 65536
#signaturelevin
EOF
fi

grep ‘pam_limits.so‘ /etc/pam.d/login &>/dev/null
if [ "$?" -eq "1" ]

then
cat >> /etc/pam.d/login <<EOF
session required pam_limits.so
#signaturelevin
EOF
fi

grep ‘ORACLE_SID=orcl‘ /home/$oname/.bash_profile &>/dev/null
if [ "$?" -eq "1" ]
then
cat >>/home/$oname/.bash_profile <<EOF
export TMP=/tmp
export ORACLE_BASE=/u01/app/$oname
export ORACLE_HOME=\$ORACLE_BASE/product/10g
export ORACLE_SID=orcl
export PATH=\$ORACLE_HOME/bin:\$PATH
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=\$ORACLE_HOME/JRE:\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
alias sqlplus="rlwrap sqlplus"
alias rman="rlwrap rman"
alias fox="firefox"
#signaturelevin
EOF
fi

. /home/$oname/.bash_profile

sed -i ‘s/5/4/‘ /etc/redhat-release #Resovling the problems brought by the version of your system.

xhost &>/dev/null

echo -e "\a"
if [ "$flag" -eq "1" ]
then
echo -e "Configure successful but the rlwrap was not compiled successfully.You should compile it by your own after finishing installs of oracle10g.Now,the following steps are your own work.\n \n 1.export LANG=C \n 2.cd database/\n 3../runInstaller\n 4.Configure according to the Oracle GUI information.\n"
else
echo -e "Configure successful!The following steps are your own work.Just do it.\n \n 1.export LANG=C \n 2.cd database/\n 3../runInstaller\n 4.Configure according to the Oracle GUI information.\n"
fi

su - $oname

站长资讯网
.
分页: [1] [2] [3]
TAG: Linux oracle 自动安装
推荐内容最近更新人气排行
关于我们 | 友情链接 | 网址推荐 | 常用资讯 | 网站地图 | RSS | 留言