#!/bin/sh
#The scripts is for RHEL5U1
#author is kevin
#date 2011-06-06
for i in libXp-1.0.0-8 openmotif-2.3.0-0.3.el5 compat-db-4.2.52-5.1 compat-gcc-34-3.4.6-4 compat-libf2c-34-3.4.6-4 compat-gcc-34-g77-3.4.6-4 compat-gcc-34-c++-3.4.6-4 compat-libstdc++-296-2.96-138 compat-libstdc++-33-3.2.3-61
do
yum install -y $i
done
Oracle_PASSWD=oracle
# oracle用户密码
SETUP_FILE_PATH=/u01/oracle
# 10g安装程序目录
INSTALL_TO_PATH=/u01
# 安装路径
#----------------------------------------
grep oracle /etc/passwd &> /dev/null
# 检查是否已经安装
if [ $? -eq 0 ]
then
clear
echo "oracle user is already existEOF"
exit 1
fi
###################调整内核参数#############################
cat >> /etc/sysctl.conf > /etc/pam.d/login > /etc/security/limits.conf /etc/RedHat-release
echo '
#--------------------------------------
# Set for Oracle10g Install ;
#--------------------------------------
trap " " 0 1 2 3 5 9 15
trap clear 0
export TMP=/tmp
export TMPDIR=$TMP
' >> /home/oracle/.bash_profile
#============
echo "export ORACLE_BASE=$INSTALL_TO_PATH" >> /home/oracle/.bash_profile
#============
echo '
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=orcl
export ORACLE_TERM=oinstall
export PATH=$ORACLE_HOME/bin:$PATH
export LANG=en_US
' >> /home/oracle/.bash_profile
# 用户ROOT登录在字符界面下
clear
echo "you can su - oracle in X and run runInstaller to install oracle now"
#su - oracle
#startx -- :1
#./runInstaller
# 开始安装ORACLE