Installing Oracle 12c on RedHat7
Problem Description :
Notes on how to install Oracle 12c on a RedHat7 server
Resolution :
Step 1: edit host file in /etc/hosts
login as root
vi /etc/hosts
set host as <IP-address> <fully-qualified-machine-name> <machine-name>
Step 2: edit Kernal parameters in /etc/sysctl.conf
vi /etc/sysctl.conf
edit any current parameters that already exists so they are not duplicated then append new parameters
run command sysctl -p to view parameters file
run sysctl -p - apply changes to apply new parameters
parameters you need to add:
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
Step 3 Edit limits file - etc/security/limits.conf
limit the oracle users resource consumption
add soft limits to issue warnings and hard limits to block
limits added are nofile, nproc, stack
limits to add
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
Step 4 - Install dependencies
run rpm -qa | <<dependency>> to check installed dependencies
run yum install <<package>> -y to install dependencies
packages to install
yum install binutils -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install zlib-devel -y
yum install zlib-devel.i686 -y
Step 5 - Add Groups and Users
run groupadd -g 54321 <<group name>> to install needed groups
54321 must increment with each group
needed groups are oinstall, dba, oper
add oracle user with useradd -u 54321 -g oinstall -G dba,oper oracle
commands to add groups and oracle user
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
useradd -u 54321 -g oinstall -G dba,oper oracle
create oracle user password with passwd oracle then enter password
Step 6 - /etc/security/limits.d/90-nproc.conf
change line * soft nrpc 1024 to equal * - nrpc 16384
Step 7 - set the SELINUX
vi /etc/sysconfig/selinux
set SELINUX=permissive
Step 8 - Stop firewalls
service iptables stop
chkconfig ipstables off
Step 9 - create directories for oracle install
mkdir -p /oracle/product/12.1.0/db_1
change owner of new directory to oracle
chown -R oracle:oinstall /oracle
chmod -R 775 /oracle
Step 10 - xhost +
run xhost +
Step 11 - Edit bash profile for oracle user /home/oracle.bash_profile
su - oracle
vi .bash_profile
add settings from attached text file
run command to apply new back profile . ./.bash_profile
Step 12 - Download oracle database software
su - oracle
unzip oracle install files in oracle directory from step 9
/oracle/database will have all necessary installation files
make sure to run xhost + as root to prevent remote connections during installation
run ./runInstaller
select "Create and configure a database" under installation options
select "Server class"
ensure that installation setting match oracle setting added in Step 11
the administrative password in the oracle account password
change order of the inventory directory equal to /oracle/oraInventory
execute config scripts
run /oracle/oraInventory/orainstRoot.shl with sh orainstRoot.sh
run /oracle/product/12.1.0/db_1/root.sh (or whichever version number you have) with sh root.sh
open password manager and set passwords to the sys level oracle users
test the database after install with sqlplus connection
Revision Date : 9/26/2019