Professional Documents
Culture Documents
Oracle 12C Installation: On Centos 7.3 Linux
Oracle 12C Installation: On Centos 7.3 Linux
INSTALLATION
On Centos 7.3 Linux
Page 1 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
Contents
Software Requirements...................................................................................................................6
Install Steps......................................................................................................................................7
Final setup......................................................................................................................................30
ORACLE POST INSTALLATION STEPS...............................................................................................31
Installation screens........................................................................................................................33
Cleanup..........................................................................................................................................41
Page 2 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-linux-
download-2240591.html
(NB You have to click on the License acceptance Radio Button first!)
REF
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/admqs/installing-oracle-database-creating-
database.html#GUID-B30C4CAE-CC53-4285-8D6C-C50A8E3B497E
The requirements may vary depending upon the type of computer and operating system you
are using, but some prerequisites include:
The appropriate service packs or patches for your operating system are installed.
Page 3 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
cd /opt/IBM/Installs
mkdir Oracle
cd Oracle
Copy the two downloaded .zip files to the Linux Vmware directory created above
cp /mnt/hgfs/Linux/9_Oracle12C/*.* .
Unzip the two install files into this directory delete the .zips to save
space and then run the Oracle Database system installer as a new oracle
user.
Providing your /tmp is shared memory (/dev/shm) and not an actual mount
point, another way to increase your /tmp is by supplying the size value in
fstab.
As an example:
OR
Which ever method you use would give you a 3 gig tmp files system.
If you are using /tmp as a separate partition, you will have to resize
that partition.
=======================================================
results:
results: informational
$ free
results: informational
$ df -k /dev/shm
results: informational
$ df -k /tmp
$ df -k
Software Requirements
To check out your recommended software requirements, login to the CentOS
7.3 Linux Server box as the root user and verify the below list:
$ cat /proc/version
$ uname -r
results:
Page 7 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
Install Steps
Check if nobody user exists, this user is almost always created on a base
CentOS installation:
$ id nobody
if this user doesn't exists then use the following command to create it:
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.shmall = 2097152
fs.file-max = 6815744
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
REF:
https://docs.oracle.com/en/database/oracle/oracle-
database/12.2/cwlin/changing-kernel-parameter-values.html#GUID-FB0CC366-
61C9-4AA2-9BE7-233EB6810A31
If you used the Oracle Preinstallation RPM to complete you preinstallation configuration
tasks, then the Oracle Preinstallation RPM sets these kernel parameters for you. However,
if you did not use the Oracle Preinstallation RPM or the kernel parameters are different from the
minimum recommended value, then to change these kernel parameter values:
Page 11 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
2. fs.aio-max-nr = 1048576
3. fs.file-max = 6815744
4. kernel.shmall = 2097152
5. kernel.shmmax = 4294967295
6. kernel.shmmni = 4096
9. net.core.rmem_default = 262144
net.core.wmem_max = 1048576
# /sbin/sysctl --system
# /sbin/sysctl -a
Include lines only for the kernel parameter values to change. For the semaphore
parameters (kernel.sem), you must specify all four values. If any of the current values
are larger than the minimum value, then specify the larger value.
See Also:
$sysctl -p
$ sudo vi /etc/security/limits.conf
Edit /etc/pam.d/login:
$ sudo vi /etc/pam.d/login
$ sudo vi /etc/profile.d/custom.sh
#!/bin/bash
ulimit -p 16384
ulimit -n 65536
else
fi
fi
$ df -kh
$ vi ~/.bash_profile
umask 022
export TMPDIR=$TMP
export ORACLE_BASE=/opt/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PATH=$ORACLE_HOME/bin:$PATH
$ source ~/.bash_profile
$ exit
Page 16 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
Ensure oracle user is using an X Windows System. For example you can
install and execute xterm:
logout and login remotely again as oracle user from a Linux client
machine with Desktop environment:
$ ssh -Y oracle@SERVER
test if xterm works you should be able to see a X11 Windows on your
client Desktop environment, if not then enable SSH X11 Forwarding (see
last step)
$ xterm
log into console as root and open a terminal window within CDE
DISPLAY=:0.0
export DISPLAY
xhost +
su - oracle
DISPLAY=:0.0
export DISPLAY
/user/openwin/bin/xclock e
NB in a CENTOS 7.3 Linux system running KDE I had to set the following in
the oracle user
First in root
List the X-Windows authorization list
Page 18 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
NB
=============X Windows====================
REF:Example of workaround
https://www.igorkromin.net/index.php/2017/07/17/running-x11-graphical-
applications-after-changing-to-another-user-using-sudo-su
xauth list
myhost.mydomain.com/unix:10 MIT-MAGIC-COOKIE-1
1183c75928e9dc95378aa3172b142652
sudo su - oracle
xauth add myhost.mydomain.com/unix:10 MIT-MAGIC-COOKIE-1
1183c75928e9dc95378aa3172b142652
Start the database installer (you should be able to see a X11 Windows
with the Oracle database installation wizard on your client Desktop
environment):
$ cd /opt/IBM/Installs/Oracle/database
$ ./runInstaller
Page 19 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
Enter Email to be used for alerts and deselect Updates via My Oracle
Support and click Next>
Page 20 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
Click Next>
Prerequisite Checks: the installer will verify the system environment and
report on any issues it may find. If all goes well you will get the status
of 'Succeeded' for every check. You have to check 'Ignore All' but ensure
at least that the following checks pass:
Free space
Group membership
Architecture
Kernel version
OS Kernel parameters
Swap size
Run level.
Packages
Select Next>
Select Yes
Summary: This screen gives a summary of the installation you are about to
perform. Click and expand the products being installed to give you an idea
of the what product and version is going to be installed.
Note the time it takes for specific products. If you notice one
hanging or taking a long amount of time (greater than 10 minutes) you
could have a condition that requires a pre-installation patch. Don't stop
the installer yet but instead start looking for a bug / patch for the
Oracle 12c installation process and the actual product being installed.
Final setup
Add the following lines to oracle's $HOME/.bash_profile archive. This will
allow you to execute various Oracle binaries to create databases,
configure network settings, and generally manage the Oracle database
environment:
umask 022
export TMPDIR=/tmp
export ORACLE_BASE=/opt/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PATH=$ORACLE_HOME/bin:$PATH
Post Install
Also some References from the previous Oracle 11g installation are still
useful:
http://www.jameskoopmann.com/docs/Install_Oracle11gCentOS5.htm
http://www.server-world.info/en/note?os=CentOS_6&p=oracle11g&f=5
/usr/sbin/getenforce
/usr/sbin/setenforce 0
SELINUX=permissive
Login as root and modify /etc/oratab file and change last character to Y
for appropriate database.
ORCL:/u01/app/oracle/product/12.1.0/db_1:Y
As root user create new file "oracle" (init script for startup and
shutdown the database) in /etc/init.d/ directory with following content:
#!/bin/bash
# chkconfig: 35 80 30
. /etc/rc.d/init.d/functions
ORACLE_OWNER="oracle"
ORACLE_HOME="/u01/app/oracle/product/12.1.0/db_1"
case "$1" in
start)
echo "OK"
;;
stop)
echo "OK"
;;
*)
esac
Execute (as root) following commands (First script change the permissions,
second script is configuring execution for specific runlevels):
As root user create new file "oraemctl" (init script for startup and
shutdown EM DB Console) in /etc/init.d/ directory with following content:
#!/bin/bash
# chkconfig: 35 80 30
. /etc/rc.d/init.d/functions
ORACLE_OWNER="oracle"
ORACLE_HOME="/u01/app/oracle/product/12.1.0/db_1"
case "$1" in
start)
echo "OK"
;;
stop)
echo "OK"
;;
*)
esac
Execute (as root) following commands (First script change the permissions,
second script is configuring execution for specific runlevels):
Installation screens
Execute configuration scripts, when the wizard asks for it:
run:
$ sudo /opt/app/oraInventory/orainstRoot.sh
Page 36 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
$ sudo /opt/app/oracle/product/12.1.0/db_1/root.sh
click OK
Page 37 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
Page 38 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
Page 39 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
Page 40 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
Page 41 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
Page 42 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
Page 43 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
Page 44 of 46 Installation of Oracle 12c R1 on Linux Centos 7.3 A. S. Bluck
th
© ASB Software Development Limited 24 March, 2019
Cleanup
If you downloaded the software from the net you can now remove .zip file
and the complete directory structure you unzipped it to.