Oracle Database 12c installation – In this blog we will discuss about the Oracle Database 12c Release 2 (12.2) 64-bit on Oracle Linux 7 (OL7) 64-bit. The minimum of 2G swap space required for installing the binaries and secure Linux set to permissive.
Oracle Linux Server 7.9 is used in real time production environment & here we are installing database versions (12.2) 64-bit on test server.
Oracle Database 12c installation
Download Software
Unzip Files
Hosts File
Oracle Installation Prerequisites
Automatic Setup Configuration
Manual Setup Configuration
Additional Setup
Database Installation
Post Installation
Download Software
Oracle Database Software Downloads :
You can download the Oracle software from OTN or MOS as per your environment.
OTN: Oracle Universal Installations (OUI) Software download
Unzip Files
Unzip the file 12c R2 database dump
unzip linuxx64_12201_database.zip
Hosts File
The “/etc/hosts” file must contain a fully qualified name for the server.
<IP-address> <fully-qualified-machine-name> <machine-name>
For example.
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.1.101 testserver01.localdomain testserver01
Set the same hostname in the “/etc/hostname” file.
testserver01.localdomain
Prerequisites for Oracle Installation :
To the Automatic Setup Configuration or the Automatic Setup Configuration there are some basic prerequisites which must be completed.
Automatic Setup Configuration:
We can use the Yum repository in Linux server to install any RPM (Redhat Package Manager). To use the Yum we must have installed Yum Repos. in the server.
# yum install oracle-database-server-12cR2-preinstall -y
# yum update -y
Manual Setup Configuration:
If you do not used the “oracle-database-server-12cR2-preinstall” package to install all the prerequisites then you will need to manually do the following tasks.
Add the following lines in the “/etc/sysctl.conf” file.
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
ESC :wq
Run this below commands to print the added lines via root owner :
/sbin/sysctl -p
Add the below lines in the “/etc/security/limits.conf” file.
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728
Add the below line in the “/etc/pam.d/login” file.
session required pam_limits.so
The Below packages are required to install the oracle binaries without any error.
RPM Packages for Oracle Database
# OL6 and OL7 (RHEL6 and RHEL7)
yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -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 libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install libXtst -y
yum install libXtst.i686 -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 libxcb -y
yum install libxcb.i686 -y
yum install make -y
yum install nfs-utils -y
yum install net-tools -y
yum install smartmontools -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
Create the new OS users and group.
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
useradd -u 54321 -g oinstall -G dba,oper oracle
Additional Setup
passwd oracle
Whether you did the manual or automatic setup we must check the below parameter during the database installation and set it disabled.
Set secure Linux disabled by editing the “/etc/selinux/config” file.
SELINUX=permissive
Save the above changes and restart the server.
setenforce Permissive
If the Linux firewall is enabled, we need to stop the service and disable it.
Run this below commands via root owner to stop the firewall :
systemctl stop firewalld
systemctl disable firewalld
mkdir -p /testdb/db/12.2.0
chown -R oracle:oinstall /testdb/
chmod -R 777 /testdb/
If you have VNC serve so take the login of your machine and run the installation. In case if there is any issue while getting the GUI screen you can also run the below command.
xhost + <machine-name>
Add the following lines at the end of the “.bash_profile” file.
[oracle@testserver01 ]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
export HISTSIZE=20000
HISTTIMEFORMAT='%F %T %t'
export HISTFILE
export ORACLE_BASE=/testdb/db/
export ORACLE_HOME=/testdb/db/12.2.0
export ORACLE_SID=test
PATH=$ORACLE_HOME/bin:$PATH; export PATH
ESC:wq
After set the above parameter you need to re-login again to same OS user to apply the bash parameter changes in effect.
or you can use the below command to set it immediately.
. ./.bash_profile
Database Installation steps on GUI interface:
cd /backup/dumpfile/database
[oracle@testserver01 database]$ ./runInstaller
Starting Oracle Universal Installer…
Checking Temp space: must be greater than 120 MB. Actual 4290 MB Passed
Checking swap space: must be greater than 150 MB. Actual 4095 MB Passed
Uncheck the Security Updates
Email not required to pass you can leave it and click on ok.
Install the Database software only:
Select single install database selection:
Select the Enterprise Edition
Pass the ORACLE_BASE and ORACLE_HOME path.
Set the Operating System Group.
Perquisite Check – Check the warning and do the needful or if ignorable the click in ignore all button & then click next.
Summary
Install Product
Run the below script via root owner.
# /testdb/db/12.2.0/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /testdb/db/12.2.0
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finish
Database software installation is completed successfully.
Post Installation
Edit the “/etc/oratab” file setting the restart flag for each instance to ‘Y’.
test:/testdb/db/12.2.0.1:Y
Related Article:
Before database software installation we need to setup GRID for ASM instance.
Click here 12cR2 GRID installation on Linux step by step
Please share this Blog with your colleagues or friends. Your suggestions and feedback are very helpful for everyone who come to this site and learn it from oracleocpworld.com.
Please comment here for your any query related to above post. You can email me on : oracleocpworld@gmail.com.