# Installing Oracle Database 11.2.0.3 on OL 7.4
Operating System: Oracle Linux Server 7.4
Oracle Database: p10404530_112030_Linux-x86-64_{1..2}of7.zip
Database Patches:
# Oracle Oracle Single Instance Requirements
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' \ | |
bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel \ | |
glibc glibc-devel ksh libaio libaio-devel libXrender libX11 libXau \ | |
libXi libXtst libgcc libnsl librdmacm libstdc++ libstdc++-devel \ | |
libxcb libibverbs make smartmontools sysstat pdksh gcc-c++ compat-libstdc++-33 \ | |
gcc unzip |
・ Configuring Yum Repositories.
Installing Operating System Packages.
yum -y install \ | |
bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel \ | |
glibc glibc-devel ksh libaio libaio-devel libXrender libX11 libXau \ | |
libXi libXtst libgcc libnsl librdmacm libstdc++ libstdc++-devel \ | |
libxcb libibverbs make smartmontools sysstat pdksh gcc-c++ compat-libstdc++-33 \ | |
gcc unzip |
# Configuring Operating Systems for Oracle Single Instance
Disabling Firewall and SElinux.
systemctl disable firewalld --now | |
sed -i '/SELINUX=/{s/enforcing/disabled/}' /etc/selinux/config |
Disabling Zero Configuration Network.
cp -p /etc/sysconfig/network{,.bak.`date +%m%d`} | |
echo "NOZEROCONF=yes" >>/etc/sysconfig/network |
Disabling Transparent Huagepages.
・ How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7, 8 and 9
Configuring Public, Private, Virtual and SCAN IP names and Addresses.
cat >>/etc/hosts <<EOF | |
# Oracle 11g | |
192.168.3.221 oracle11g | |
EOF |
# Configuring Users, Groups and Environments for Oracle Grid Infrastructure and Oracle Database
Create Oracle software owner user accounts on each cluster node
groupadd -g 54321 oinstall | |
groupadd -g 54322 dba | |
useradd -u 54321 -g oinstall -G dba -m -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle | |
echo "oracle" | passwd --stdin oracle |
Create Grid home and Oracle home directories on each cluster node.
mkdir -p /u01/app/oracle/product/11.2.0/db_1 | |
chown -R oracle:oinstall /u01 | |
chmod -R 775 /u01 |
Configure Oracle Software owner user account environment on each cluster node.
cat >> /home/oracle/.bash_profile << "EOF" | |
# Oracle 11g | |
export ORACLE_SID=coco | |
export ORACLE_BASE=/u01/app/oracle | |
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 | |
export PATH=$ORACLE_HOME/bin:$PATH | |
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib | |
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib | |
if command -v rlwrap >/dev/null 2>&1; then | |
alias sqlplus='rlwrap sqlplus' | |
alias rman='rlwrap rman' | |
fi | |
EOF |
# Completing Preinstallation Tasks Manually
# Configuring Kernel Parameters for Linux
Create or edit the /etc/sysctl.d/97-oracle-database-11g-sysctl.conf file, and add or edit lines similar to:
cat >/etc/sysctl.d/97-oracle-database-11g-sysctl.conf <<EOF | |
fs.file-max = 6815744 | |
kernel.sem = 250 32000 100 128 | |
kernel.shmmni = 4096 | |
kernel.shmall = 1073741824 | |
kernel.shmmax = 4398046511104 | |
kernel.panic_on_oops = 1 | |
net.core.rmem_default = 262144 | |
net.core.rmem_max = 4194304 | |
net.core.wmem_default = 262144 | |
net.core.wmem_max = 1048576 | |
net.ipv4.conf.all.rp_filter = 2 | |
net.ipv4.conf.default.rp_filter = 2 | |
fs.aio-max-nr = 1048576 | |
net.ipv4.ip_local_port_range = 9000 65500 | |
EOF | |
sysctl --system |
# Configuring Resource Limits for Oracle Software Installation Users
cat >/etc/security/limits.d/97-oracle-database-11g-limits.conf <<EOF | |
oracle soft nofile 1024 | |
oracle hard nofile 65536 | |
oracle soft nproc 16384 | |
oracle hard nproc 16384 | |
oracle soft stack 10240 | |
oracle hard stack 32768 | |
oracle hard memlock 134217728 | |
oracle soft memlock 134217728 | |
EOF |
# Installing the Oracle Database Software
Download and change the Oracle Database image files permissions.
chown -R oracle:oinstall /soft/p10404530_112030_Linux-x86-64_[12]of7.zip |
Login as the oracle user, extract the files and run installer.
unzip -q -d /soft /soft/p10404530_112030_Linux-x86-64_1of7.zip; unzip -q -d /soft /soft/p10404530_112030_Linux-x86-64_2of7.zip | |
/soft/database/runInstaller |