April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Oracle 12C database on Rhel 7 Centos 7 Fedora

Install Oracle Database 12c On CentOS7

Add a host file entry

[root@oracledb ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.60 oracledb.rmohan.com oracledb

[root@oracledb ~]# hostnamectl
Static hostname: oracledb.rmohan.com
Icon name: computer-vm
Chassis: vm
Machine ID: 4145c21ef6ec4ca3a6a4ea34087a5552
Boot ID: a0d067b346df44f98ba7248578bfde3b
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-229.1.2.el7.x86_64
Architecture: x86_64

[root@oracledb ~]# cat   /etc/centos-release
CentOS Linux release 7.1.1503 (Core)
[root@oracledb ~]#

[root@oracledb ~]# ip a   | grep inet
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
inet 192.168.1.60/24 brd 192.168.1.255 scope global eno16777736
inet6 fe80::20c:29ff:feac:4a80/64 scope link tentative dadfailed
[root@oracledb ~]#

Login as root and add required groups:

/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd-g 503 oper
/usr/sbin/groupadd-g 504 asmadmin
/usr/sbin/groupadd-g 506 asmdba
/usr/sbin/groupadd -g 505 asmoper
useradd -u 502 -g oinstall -G dba,asmdba,oper oracle
passwd oracle

Upload the oracle software on to the server

I downloaded the following database packages.

cd /root/software

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
rpm -ivh epel-release-7-5.noarch.rpm

yum groupinstall “GNOME Desktop” -y
yum groupinstall “Development Tools” -y

Oracle Installation Prerequisites

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 compat-libcap1 -y

[root@oracledb ~]#sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmall = 4294967296
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
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

[root@oracledb ~]#
Add following lines to set shell limits for user oracle in file /etc/security/limits.conf

oracle   soft   nproc    131072
oracle   hard   nproc    131072
oracle   soft   nofile   131072
oracle   hard   nofile   131072
oracle   soft   core     unlimited
oracle   hard   core     unlimited
oracle   soft   memlock  50000000
oracle   hard   memlock  50000000

[root@clusterserver2 yum.repos.d]# systemctl stop firewalld.service
[root@clusterserver2 yum.repos.d]# systemctl disable firewalld.service
rm ‘/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service’
rm ‘/etc/systemd/system/basic.target.wants/firewalld.service’
[root@clusterserver2 yum.repos.d]#

su  – oracle
cd /software
unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip

 

Oracle12cdb 001 Oracle12cdb 002 Oracle12cdb 003 Oracle12cdb 004 Oracle12cdb 005 Oracle12cdb 006 Oracle12cdb 007 Oracle12cdb 008 Oracle12cdb 009 Oracle12cdb 010

 
During the linking phase, you will see the following error.

Error in invoking target ‘links proc gen_pcscfg procob’ of makefile
‘/home/oracle/app/oracle/product/12.1.0/precomp/lib/ins_precomp.mk’.
See
‘/u01/app/oraInventory/logs/installActions2014-10-29_09-07-03PM.log’
for details.

To fix it, do the following:

rm -rf $ORACLE_HOME/lib/stubs/*
cp $ORACLE_HOME/rdbms/lib/env_rdbms.mk $ORACLE_HOME/rdbms/lib/env_rdbms.mk.orig

Perform the following modifications:

vi $ORACLE_HOME/rdbms/lib/env_rdbms.mk

# Line 176
# FROM:
LINKTTLIBS=$(LLIBCLNTSH) $(ORACLETTLIBS) $(LINKLDLIBS)
# TO  :
LINKTTLIBS=$(LLIBCLNTSH) $(ORACLETTLIBS) $(LINKLDLIBS) -lons

# Line 279-280
# FROM:
LINK=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS) $(COMPSOBJS)
LINK32=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS32) $(COMPSOBJS)
# TO  :
LINK=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS) $(COMPSOBJS) -Wl,–no-as-needed
LINK32=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS32) $(COMPSOBJS) -Wl,–no-as-needed

# Line 3041-3042
# FROM:
TG4PWD_LINKLINE= $(LINK) $(OPT) $(TG4PWDMAI) \
$(LLIBTHREAD) $(LLIBCLNTSH) $(LINKLDLIBS)
# TO  :
TG4PWD_LINKLINE= $(LINK) $(OPT) $(TG4PWDMAI) \
$(LLIBTHREAD) $(LLIBCLNTSH) $(LINKLDLIBS) -lnnz12

Click the “Retry” button.

Now, the installation should continue.
[root@oracledb oracle]# /home/oracle/app/oraInventory/orainstRoot.sh
Changing permissions of /home/oracle/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /home/oracle/app/oraInventory to oinstall.
The execution of the script is complete.
[root@oracledb oracle]# chmod 775 /home/oracle/app/oracle/product/12.1.0/dbhome_1/r
racg/     rdbms/    relnotes/ rest/     root.sh
[root@oracledb oracle]# chmod 775 /home/oracle/app/oracle/product/12.1.0/dbhome_1/r
racg/     rdbms/    relnotes/ rest/     root.sh
[root@oracledb oracle]# chmod 775 /home/oracle/app/oracle/product/12.1.0/dbhome_1/root.sh
[root@oracledb oracle]# sh /home/oracle/app/oracle/product/12.1.0/dbhome_1/root.sh
Performing root user operation.

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME=  /home/oracle/app/oracle/product/12.1.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin …
Copying oraenv to /usr/local/bin …
Copying coraenv to /usr/local/bin …

Creating /etc/oratab file…
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.

 

 

Oracle12cdb 011 Oracle12cdb 012

Oracle13 Oracle12cdb 013

 

 

 

 

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>