Oracle Installation
These instructions are for an example installation of an Oracle 10g 10.1.0.3 64-bit database on SL 4.01 x86_64. These instructions are similar to installing a 32-bit version of the database.
Preinstallation Tasks
- Create required groups and users if they do not already exist. Set the oracle user password:
groupadd -g 550 oinstall
groupadd -g 551 dba
groupadd -g 552 oper
useradd -u 550 -g oinstall -G dba,oper oracle
passwd oracle - Set permissions on directories (assuming dirs are empty):
mkdir /home/oradata3 /orabase/oradata2
ln -s /orabase/oradata2 /oradata2
ln -s /home/oradata3 /oradata3
chown oracle:oinstall /orabase /oradata?/. - Change Shell limits for oracle user:
cd /etc/security/
cp -p limits.conf limits.conf.orig
tail -7 limits.conf
## for oracle
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536 - Alter the pam login rule by addling pam_limits session entry:
cat /etc/pam.d/login
#%PAM-1.0
auth required pam_securetty.so
auth required pam_stack.so service=system-auth
auth required pam_nologin.so
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session required pam_stack.so service=system-auth
session required pam_limits.so
session optional pam_console.so
# pam_selinux.so open should be the last session rule
session required pam_selinux.so multiple open - Change the oracle users shell to increase the following limits by adding this to to ~oracle/.bash_profile:
ulimit -u 16384 -n 65536 2>/dev/null - Set up the kernel configuration, then reboot the node:
cp -p /etc/sysctl.conf /etc/sysctl.conf.orig
tail -5 /etc/sysctl.conf
## for Oracle
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
kernel.shmmax = 1073741824
# reboot
/sbin/sysctl -a 2>/dev/null | \
grep -E '(file-max|shm|ip_local_port|rmem|wmem|sem)'| \
grep -v tcp_ |grep -v huge|sort
fs.file-max = 203502
kernel.sem = 250 32000 100 128
kernel.shmall = 2097152
kernel.shmmax = 1073741824
kernel.shmmni = 4096
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.ipv4.ip_local_port_range = 1024 65000
Pre-installation tasks related to SL 4
- Temporarily edit /etc/redhat-release so that it advertises itself as a version 3 operating system installation.
- Temporarily link /usr/bin/gcc to the older version of gcc:
mv /usr/bin/gcc /usr/bin/gcc.orig
ln -s /usr/bin/gcc32 /usr/bin/gcc
mv /usr/X11R6/bin/rman /usr/X11R6/bin/rman.orig
Installation Tasks
The installation is done as the 'oracle' user. Some steps require a root shell; the installer prompts you when you need to run a shell script as root.For 64-bit installations 2 CD images are required. The 2nd CD is small, so it can be copied into, for example, /var/tmp so that when you are prompted to change CDs you can specify the alternate path, avoiding running to the server room.
- Set the necessary environment variables for the oracle user, and
then login as 'oracle':
$ tail -5 ~/.bash_profileulimit -u 16384 -n 65536 2>/dev/null
ORACLE_SID=lcg
ORACLE_BASE=/orabase
export ORACLE_BASE - Mount the CD and start the installer:
/mnt/cdrom/runInstaller - Accept most defaults. Pick 'Enterprise Edition' and the 'Do not create a starter database' option (i.e. install software only).
- Near the end of the install, the last script you run as root (something like /orabase/OraHome_1/root.sh)
will prompt you for where the local bin directory is - specify
/usr/local/bin. It will also replace /etc/inittab with a modified
version. We prefer to use the sysv init system. Therefore
copy back the previous version of initab and send a signal to init:
cp -p /etc/inittab.no_cssd /etc/inittab
telinit Q -
Copy into /etc/init.d/oracle a startup script and enable it:
chkconfig --add oracle