#!/bin/sh

groupadd dba
groupadd oinstall
useradd -m oracle -g oinstall -G dba
mkdir /oracle
mkdir /oracle/10g
chown -R oracle:oinstall /oracle
mkdir /osource

cat >> /home/oracle/.bash_profile << EOF
#Added for Oracle Installation
ORACLE_BASE=/oracle
ORACLE_HOME=/oracle/10g
ORACLE_SID=ZARD
export ORACLE_BASE ORACLE_HOME ORACLE_SID
PATH=/oracle/10g/bin:$PATH:.
export PATH
EOF

cat >> /etc/sysctl.conf << EOF
#Added for Oracle Installation 
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144
EOF

/sbin/sysctl -p

passwd oracle
