Installing and configuring Oracle 11.2 on Centos 6.6

Required RPMs

When installing Oracle 11G R2 on CentOS 6.6 you will find a dozen install guides with prereq’s and what not. Below are the information from Oracle (https://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm#BHCGJCEA)

binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6.i686
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6.i686
ksh
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6.i686
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6.i686
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6.i686
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6.i686
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)

As of November 20th 2014, CentOS 6.6 have newer versions, and they can all be installed with the following command

# sudo yum install binutils compat-libcap1 compat-libstdc++ gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstdc++-devel libaio libaio-devel make sysstat

However, some of these packages also have to be installed with 32-bit editions as well as the x64-editions. I did not verify that I needed all of them but my working system has these 32-bit packages installed

glibc-2.12-1.149.el6.i686
ksh-20120801-21.el6.1.i686
compat-libstdc++-296-2.96-144.el6.i686
nss-softokn-freebl-3.14.3-17.el6.i686
libgcc-4.4.7-11.el6.i686
glibc-devel-2.12-1.149.el6.i686

If you have newer versions of the x64-packages, you just substitute the x86_64 with i686. Eg with libgcc you might have libgcc-4.4.7-11.el6.x86_64 installed, to get the 32-bit edition do

# sudo yum install libgcc-4.4.7-11.el6.i686

to get the corresponding 32-bit package.

System parameters

Oracle 11G R2 require a few other parameter changes as well. Here are the relevant things you should change

Edit /etc/security/limits.conf and add the following at the bottom

oracle soft nproc 2047
oracle hard nofile 65536

Edit /etc/security/limits.d/90-nproc.conf and make it look like this

* soft nproc 1024
root soft nproc unlimited
oracle soft nproc 2047
oracle hard nproc 16384

You will surely see a note about missing pdksh-5.2.14 as well, even with all the prereq’s installed

Edit /»your_source»/database/stage/cvu/cv/admin/cvu_config and change the following

# Fallback to this distribution id
CV_ASSUME_DISTID=OEL4

to

# Fallback to this distribution id
CV_ASSUME_DISTID=OEL6

Change your /etc/sysctl.conf to this

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Disable netfilter on bridges.
#net.bridge.bridge-nf-call-ip6tables = 0
#net.bridge.bridge-nf-call-iptables = 0
#net.bridge.bridge-nf-call-arptables = 0
# Controls the default maxmimum size of a mesage queue
kernel.msgmnb = 65536
# Controls the maximum size of a message, in bytes
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
# oracle-rdbms-server-11gR2-preinstall setting for fs.file-max is 6815744
fs.file-max = 6815744
# oracle-rdbms-server-11gR2-preinstall setting for kernel.sem is '250 32000 100 128'
kernel.sem = 250 32000 100 128
# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmni is 4096
kernel.shmmni = 4096
# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 1073741824 on x86_64
# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 2097152 on i386
# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmax is 4398046511104 on x86_64
# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmax is 4294967295 on i386
kernel.shmmax = 4398046511104
# oracle-rdbms-server-11gR2-preinstall setting for kernel.panic_on_oops is 1 per Orabug 19212317
kernel.panic_on_oops = 1
# oracle-rdbms-server-11gR2-preinstall setting for net.core.rmem_default is 262144
net.core.rmem_default = 262144
# oracle-rdbms-server-11gR2-preinstall setting for net.core.rmem_max is 4194304
net.core.rmem_max = 4194304
# oracle-rdbms-server-11gR2-preinstall setting for net.core.wmem_default is 262144
net.core.wmem_default = 262144
# oracle-rdbms-server-11gR2-preinstall setting for net.core.wmem_max is 1048576
net.core.wmem_max = 1048576
# oracle-rdbms-server-11gR2-preinstall setting for fs.aio-max-nr is 1048576
fs.aio-max-nr = 1048576
# oracle-rdbms-server-11gR2-preinstall setting for net.ipv4.ip_local_port_range is 9000 65500
net.ipv4.ip_local_port_range = 9000 65500

A simple .bash_profile for the oracle-user might look like this

# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
 . ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=oratest01.my.domain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=TEST; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TEST; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

If you’re on DHCP network, make sure you include your hostname in the /etc/hosts file, eg

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.1 oratest01.my.domain oratest01

To get RMAN and EMM working you also need to get the tnsnames and listener up and running

My simple config looks like this

listener.ora
# listener.ora Network Configuration File: /d01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
 (ADDRESS_LIST=
 (ADDRESS=(PROTOCOL=tcp)(HOST=oratest01.my.domain)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
 )
)
SID_LIST_LISTENER=
 (SID_LIST=
 (SID_DESC=
 (GLOBAL_DBNAME=TEST)
 (SID_NAME=TEST)
 (ORACLE_HOME=/u01/app/oracle/product/11.2/db_1/)
 )
 )
# SECURE_REGISTER_LISTENER = (IPC)
tnsnames.ora
# tnsnames.ora Network Configuration File: /d01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_TEST =
 (ADDRESS = (PROTOCOL = TCP)(HOST = oratest01.my.domain)(PORT = null))

TEST =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = oratest01.my.domain)(PORT = 1521))

 (CONNECT_DATA =
 (SERVER = SHARED)
 (SERVICE_NAME = TEST)
 )
 )

Probably more to come…

Advertisements