Perform steps as root unless stated otherwise.
Check all requirements before continuing.
# grep -i memtotal /proc/meminfo
should be > 1GB
# grep -i swaptotal /proc/meminfo
should be
# df -h /tmp
should be atleast 400MB
# df -h
should be (depending on installation) between 1.5GB and 3GB
Choose the one which fits your system!
# rpm -q compat-libstdc++-33.x86_64 binutils elfutils-libelf elfutils-libelf-devel # rpm -q glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio-devel # rpm -q libaio libgcc libstdc++ make sysstat unixODBC unixODBC-devel
# yum install compat-libstdc++-33.x86_64 binutils elfutils-libelf elfutils-libelf-devel # yum install glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio-devel # yum install libaio libgcc libstdc++ make sysstat unixODBC unixODBC-devel
# rpm -q compat-libstdc++-33.i686 binutils elfutils-libelf elfutils-libelf-devel # rpm -q glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio-devel # rpm -q libaio libgcc libstdc++ make sysstat unixODBC unixODBC-devel
# yum install compat-libstdc++-33.i686 binutils elfutils-libelf elfutils-libelf-devel # yum install glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio-devel # yum install libaio libgcc libstdc++ make sysstat unixODBC unixODBC-devel
# yum install unzip
Please note that, when you are using Oracle Linux 6.x, some of the missing libraries can usually be ignored since the OUI does not recognise newer packages. The following packages can be ignored:
Create groups oinstall & dba:
# groupadd oinstall # groupadd dba
Create the oracle user and set its password:
# useradd -m -g oinstall -G dba -s /bin/bash oracle # passwd oracle
Change the parameters if they are lower than stated here (take notes and edit /etc/sysctl.conf after you checked all parameters):
# sysctl -a | grep kernel.sem
should be ≥ than:
kernel.sem = 250 32000 100 128
# sysctl -a | grep kernel.shm
should be ≥ than:
kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.shmall = 2097152
# sysctl -a | grep file-max
should be ≥ than:
fs.file-max = 6815744
# sysctl -a | grep ip_local_port_range
minimal value should be ≤ 9000 and maximum value should be ≥ 65500, see example below:
net.ipv4.ip_local_port_range = 9000 65500
# sysctl -a | grep rmem_default
should be ≥ than:
net.core.rmem_default = 262144
# sysctl -a | grep rmem_max
should be ≥ than:
net.core.rmem_max = 4194304
# sysctl -a | grep wmem_default
should be ≥ than:
net.core.wmem_default = 262144
# sysctl -a | grep wmem_max
should be ≥ than:
net.core.wmem_max = 1048576
# sysctl -a | grep aio-max-nr
should be ≥ than:
fs.aio-max-nr = 1048576
kernel.sem = 250 32000 100 128 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.shmall = 2097152 fs.file-max = 6815744 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.aio-max-nr = 1048576
Apply the changes:
# sysctl -p
# vi /etc/security/limits.conf
Add the following:
oracle soft nproc 2048 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
# vi /etc/pam.d/login
For 64-Bit systems:
session required /lib64/security/pam_limits.so
For 32-Bit systems:
session required pam_limits.so
Always check the location for pam_limits.so. The location depends on distribution or architecture.
For CentOS 6.x it is /lib64/security/pam_limits.so.
If you are unsure use find / -name pam_limits.so
to locate pam_limits.so.
# mkdir -p /opt/app/oracle/product/11.2.0 # chown -R oracle:oinstall /opt/app # chmod -R 775 /opt/app
# vi /etc/profile.d/custom.sh
Add the following:
#!/bin/bash if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
Allow it to be executed:
# chmod +x /etc/profile.d/custom.sh
# vi ~/.bash_profile
Add the following:
umask 022 export TMPDIR=/tmp export ORACLE_BASE=/opt/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export PATH=$ORACLE_HOME/bin:$PATH
Execute ~/.bash_profile:
# source ~/.bash_profile