Preparing OEL6/CentOS6 for an Oracle 12c Database Server

Perform steps as root unless stated otherwise.


If you are using Oracle Enterprise Linux 6, then you can use the easy setup.
If you are using CentOS or want to know what needs to be changed, please follow the instructions for the manual setup.

Easy/Automatic Setup (for OEL6 only)

Install the Oracle Pre-Install package

# yum install oracle-rdbms-server-12cR1-preinstall

Set password for newly created user "oracle"

# passwd oracle

Disable SELinux by making changes to /etc/selinux/config

SELINUX=permissive

Apply the changes via the following

# setenforce Permissive

Disable iptables

# service iptables stop
# chkconfig iptables off

Edit /etc/security/limits.d/90-nproc.conf

*    -    nproc    16384

Create folders for database software

# mkdir -p /u01/app/oracle/product/12.1.0/db1
# chown -R oracle:oinstall /u01
# chmod -R 775 /u01

Edit /home/oracle/.bash_profile

# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=culbor1
export ORACLE_UNQNAME=culbordb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db1
export ORACLE_SID=culbordb1

export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Manual Setup (for OEL6 and CentOS)

Change or add the following in /etc/sysctl.conf

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
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
net.ipv4.ip_local_port_range = 9000 65500

Add the following lines to /etc/security/limits.conf

oracle    soft    nofile    1024
oracle    hard    nofile    65536
oracle    soft    nproc    16384
oracle    hard    nproc    16384
oracle    soft    stack    10240
oracle    hard    stack    32768

Install the following packages

# yum install binutils
# yum install compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686
# yum install gcc gcc-c++
# yum install glibc glibc.i686 glibc-devel glibc-devel.i686
# yum install ksh
# yum install libgcc libgcc.i686
# yum install libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686
# yum install libaio libaio.i686 libaio-devel libaio-devel.i686
# yum install libXext libXext.i686
# yum install libXtst libXtst.i686
# yum install libX11 libX11.i686
# yum install libXau libXau.i686
# yum install libxcb libxcb.i686
# yum install libXi libXi.i686
# yum install make
# yum install sysstat
# yum install unixODBC unixODBC-devel

Create groups and the user "oracle"

# groupadd -g 54321 oinstall
# groupadd -g 54322 dba
# useradd -u 54321 -g oinstall -G dba oracle

Set password for newly created user "oracle"

# passwd oracle

Disable SELinux by making changes to /etc/selinux/config

SELINUX=permissive

Apply the changes via the following

# setenforce Permissive

Disable iptables

# service iptables stop
# chkconfig iptables off

Edit /etc/security/limits.d/90-nproc.conf

*    -    nproc    16384

Create folders for database software

# mkdir -p /u01/app/oracle/product/12.1.0/db1
# chown -R oracle:oinstall /u01
# chmod -R 775 /u01

Edit /home/oracle/.bash_profile

# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=culbor1
export ORACLE_UNQNAME=culbordb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db1
export ORACLE_SID=culbordb1

export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib