#! /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 user password
SETUP_FILE_PATH =/u01/oracle
#10g installer directory
INSTALL_TO_PATH =/u01
# Installation path
#----------------------------------------
Grep oracle/etc/passwd &>/dev/null
# Check whether the installation is complete
If [$? -Eq 0]
Then
Clear
Echo "oracle user is already existEOF"
Exit 1
Fi
################### Adjust Kernel Parameters ################## ###########
Cat>/etc/sysctl. conf <EOF
Kernel. sem = 250 32000 100 128
Fs. file-max = 65546
Net. ipv4.ip _ local_port_range = 1024 65000
Net. core. rmem_default = 1048576
Net. core. rmem_max = 1048576
Net. core. wmem_default = 1048576
Net. core. wmem_max = 1048576
EOF
Sysctl-p
# Submit configuration parameters
################### Create and install users and groups ################ #########
# Off Selinux
Groupadd dba & groupadd oinstall
Useradd-g oinstall-G dba-m oracle
Echo $ ORACLE_PASSWD | passwd oracle -- stdin
Mkdir-p $ INSTALL_TO_PATH
Chown-R oracle. oinstall $ INSTALL_TO_PATH
##=================================================== ========
Cat>/etc/pam. d/login <EOF
# Add content for oracle install
Session required pam_limits.so
EOF
# Turn on limits for oracle 10g
Cat>/etc/security/limits. conf <EOF
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 4096
Oracle hard nofile 65535
EOF
##=================================================== ========
Echo 'Red Hat Enterprise Linux Server release 4 (Tikanga) '>/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
# User ROOT login on the Character Interface
Clear
Echo "you can su-oracle in X and run runInstaller to install oracle now"
# Su-oracle
# Startx --: 1
#./RunInstaller
# Start ORACLE Installation