ORACLE 10g Setup on LOCAL RHEL4 Server


Below are the commands or you can have shell script using it to set all the prerequisite for oracle 10g database server setup on rhel4.

#============================================================================================================================
echo "This Script is created by Mrugesh Raval (RHCE)"
echo "This script is created to help Oracle DBA to set environment variable on CORE Red Hat Linux Server"
echo "This Script is not for sale"
echo "No Support What so ever provided if anything goes wrong to your system"
echo "so run this script at your own risk"
#============================================================================================================================
cat /etc/issue
#============================================================================================================================
echo "Please verify your operating system & checking hardware"
#============================================================================================================================
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
df -h /tmp
df -h
grep "model name" /proc/cpuinfo
uname -r
#============================================================================================================================
echo "Checking required Packages"
#============================================================================================================================
rpm -q binutils compat-db control-center gcc gcc-c++ glibc
rpm -q glibc-common gnome-libs
rpm -q libstdc++ libstdc++-devel make pdksh sysstat
rpm -q xscreensaver libaio openmotif21
rpm -q xorg-x11
rpm -q  xorg-x11-libs
#=============================================================================================================================
echo  "check output above on your screen and verify that all the required
 packages are installed. If some packages remain / not installed then
 you can install after execution of this script completes and before
 starting setup of oracle."
#=============================================================================================================================
uname -mi
#=============================================================================================================================
echo  "above command shows your machine & o/s architecture"
#=============================================================================================================================
echo  "creating user oracle groups for user oracle"
#============================================================================================================================
groupadd oinstall
groupadd dba
useradd -c "Oracle Software Owner" -m -g oinstall -G dba oracle
#============================================================================================================================
echo "Please set password for user oracle after the script executed successfully"
#============================================================================================================================
echo kernel.shmall = 2097152 >> /etc/sysctl.conf
echo kernel.shmmax = 2147483648 >> /etc/sysctl.conf
echo kernel.shmmni = 4096 >> /etc/sysctl.conf
echo kernel.sem = 250 32000 100 128 >> /etc/sysctl.conf
echo fs.file-max = 65536 >> /etc/sysctl.conf
echo net.ipv4.ip_local_port_range = 1024 65000 >> /etc/sysctl.conf
echo net.core.rmem_default=262144 >> /etc/sysctl.conf
echo net.core.wmem_default=262144 >> /etc/sysctl.conf
echo net.core.rmem_max=262144 >> /etc/sysctl.conf
echo net.core.wmem_max=262144 >> /etc/sysctl.conf
#============================================================================================================================
echo "PLEASE WAIT --> while we set KERNEL Parameters"
#============================================================================================================================
sysctl -p
#============================================================================================================================
echo "Please Standby till we configure /etc/security/limits.conf"
#============================================================================================================================
echo oracle soft nproc   2047 >> /etc/security/limits.conf
echo oracle hard nproc   16384 >> /etc/security/limits.conf
echo oracle soft nofile   1024 >> /etc/security/limits.conf
echo oracle hard nofile   65536 >> /etc/security/limits.conf
#============================================================================================================================
echo "Please wait till we configure /etc/profile"
#============================================================================================================================
echo 'if [ \$USER = "oracle" ]; then' >> /etc/profile
echo 'if [ \$SHELL = "/bin/ksh" ]; then' >> /etc/profile
echo 'ulimit -p 16384' >> /etc/profile
echo 'ulimit -n 65536' >> /etc/profile
echo 'else' >> /etc/profile
echo 'ulimit -u 16384 -n 65536' >> /etc/profile
echo 'fi' >> /etc/profile
echo 'umask 022' >> /etc/profile
echo 'fi' >> /etc/profile
#============================================================================================================================
echo "Please Standby till we configure /etc/csh.login"
#============================================================================================================================
echo 'if ( \$USER == "oracle" ) then' >> /etc/csh.login
echo 'limit maxproc 16384' >> /etc/csh.login
echo 'limit descriptors 65536' >> /etc/csh.login
echo 'umask 022' >> /etc/csh.login
echo 'endif' >> /etc/csh.login
#============================================================================================================================
echo "Now, Creating required directories for installation"
#============================================================================================================================
mkdir -p /oradata/app/oracle
chown -R oracle:oinstall /oradata/app/oracle
chmod -R 775 /oradata/app/oracle
#============================================================================================================================
echo "Please wait as we set ORACLE_HOME, ORACLE_SID etc. parameters for user oracle in file /home/oracle/.bash_profile"
#============================================================================================================================
echo 'TMP=/tmp; export TMP' >> /home/oracle/.bash_profile
echo 'TMPDIR=$TMP; export TMPDIR' >> /home/oracle/.bash_profile
echo 'ORACLE_BASE=/oradata/app/oracle; export ORACLE_BASE' >> /home/oracle/.bash_profile
echo 'ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME' >> /home/oracle/.bash_profile
echo 'ORACLE_SID=ora10; export ORACLE_SID' >> /home/oracle/.bash_profile
echo 'ORACLE_TERM=xterm; export ORACLE_TERM' >> /home/oracle/.bash_profile
echo 'PATH=/usr/sbin:$PATH; export PATH' >> /home/oracle/.bash_profile
echo 'PATH=$ORACLE_HOME/bin:$PATH; export PATH' >> /home/oracle/.bash_profile
echo 'LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH' >> /home/oracle/.bash_profile
echo 'CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH' >> /home/oracle/.bash_profile
echo           >> /home/oracle/.bash_profile
echo  >> /home/oracle/.bash_profile
echo 'if [ $USER = "oracle" ]; then' >> /home/oracle/.bash_profile
echo 'if [ $SHELL = "/bin/ksh" ]; then' >> /home/oracle/.bash_profile
echo 'ulimit -p 16384' >> /home/oracle/.bash_profile
echo 'ulimit -n 65536' >> /home/oracle/.bash_profile
echo 'else' >> /home/oracle/.bash_profile
echo 'ulimit -u 16384 -n 65536' >> /home/oracle/.bash_profile
echo 'fi' >> /home/oracle/.bash_profile
echo 'fi' >> /home/oracle/.bash_profile
#============================================================================================================================
echo "This Script is created by Mrugesh Raval (RHCE)"
echo "This script is created to help Oracle DBA to set environment variable on CORE Red Hat Linux Server"
echo "This Script is not for sale"
echo "No Support What so ever provided if anything goes wrong to your system"
echo "so run this script at your own risk"
#============================================================================================================================

Once all set. login as user oracle. extract oracle10g setup archive & then run ./runInstaller. A GUI Setup Screen will appear & then complete the setup.