0% found this document useful (0 votes)
411 views57 pages

Oracle Installation From Oracle-Base

The document describes the installation of Oracle Database 11g Release 2 (11.2) on Oracle Linux 6. It outlines downloading and unpacking the software, completing various prerequisites like editing configuration files and installing packages, and going through the installation process using the Oracle Universal Installer. Common errors during installation are also listed.

Uploaded by

kdrr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
411 views57 pages

Oracle Installation From Oracle-Base

The document describes the installation of Oracle Database 11g Release 2 (11.2) on Oracle Linux 6. It outlines downloading and unpacking the software, completing various prerequisites like editing configuration files and installing packages, and going through the installation process using the Oracle Universal Installer. Common errors during installation are also listed.

Uploaded by

kdrr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Oracle Database 11g Release 2 (11.

2) Installation On
Oracle Linux 6
This article describes the installation of Oracle Database 11g Release 2 (11.2) (64-bit)
on Oracle Linux 6 (64-bit). The article is based on a server installation with a minimum
of 2G swap, with SELinux set to permissive and the firewall disabled. The following
package groups were included for this installation.

Base System > Base


Base System > Client management tools
Base System > Compatibility libraries
Base System > Hardware monitoring utilities
Base System > Large Systems Performance
Base System > Network file system client
Base System > Performance Tools
Base System > Perl Support
Servers > Server Platform
Servers > System administration tools
Desktops > Desktop
Desktops > Desktop Platform
Desktops > Fonts
Desktops > General Purpose Desktop
Desktops > Graphical Administration Tools
Desktops > Input Methods
Desktops > X Window System
Development > Additional Development
Development > Development Tools
Applications > Internet Browser

An example of this type of Linux installations can be seen here. Alternative installations
may require more packages to be loaded, in addition to the ones listed below.

Download Software
Unpack Files
Hosts File
Oracle Installation Prerequisites

o Automatic Setup
o Manual Setup
o Additional Setup
Installation
Post Installation
Common Errors
Download Software
Download the Oracle software from OTN or MOS depending on your support status.

OTN: Oracle Database 11g Release 2 (11.2.0.1) Software (64-bit) - For


unsupported installation.
MOS: Oracle Database 11g Release 2 (11.2.0.3) Software (64-bit) - For
supported installation.

Unpack Files
Unzip the files.

# 11.2.0.1
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip

#11.2.0.2
unzip p10098816_112020_Linux-x86-64_1of7.zip
unzip p10098816_112020_Linux-x86-64_2of7.zip

#11.2.0.3
unzip p10404530_112030_Linux-x86-64_1of7.zip
unzip p10404530_112030_Linux-x86-64_2of7.zip

#11.2.0.4
unzip p13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip

You should now have a single directory called "database" containing installation files.

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.localdomain localhost


192.168.0.181 ol6-112.localdomain ol6-112

Oracle Installation Prerequisites


Perform either the Automatic Setup or the Manual Setup to complete the basic
prerequisites. The Additional Setup is required for all installations.

Automatic Setup
If you plan to use the "oracle-rdbms-server-11gR2-preinstall" package to perform all
your prerequisite setup, follow the instructions at http://public-yum.oracle.com to setup
the yum repository for OL, then perform the following command.

# yum install oracle-rdbms-server-11gR2-preinstall

All necessary prerequisites will be performed automatically.


It is probably worth doing a full update as well, but this is not strictly speaking
necessary.

# yum update

Manual Setup
If you have not used the "oracle-rdbms-server-11gR2-preinstall" package to perform all
prerequisites, you will need to manually perform the following setup tasks.
Oracle recommend the following minimum parameter settings.

fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

The current values can be tested using the following command.

/sbin/sysctl -a | grep <param-name>

Add or amend the following lines in the "/etc/sysctl.conf" file.

fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586

Run the following command to change the current kernel parameters.

/sbin/sysctl -p

Add the following lines to the "/etc/security/limits.conf" file.

oracle soft nproc 16384


oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240

Install the following packages if they are not already present.

# From Oracle Linux 6 DVD


cd /media/cdrom/Server/Packages
rpm -Uvh binutils-2*x86_64*
rpm -Uvh glibc-2*x86_64* nss-softokn-freebl-3*x86_64*
rpm -Uvh glibc-2*i686* nss-softokn-freebl-3*i686*
rpm -Uvh compat-libstdc++-33*x86_64*
rpm -Uvh glibc-common-2*x86_64*
rpm -Uvh glibc-devel-2*x86_64*
rpm -Uvh glibc-devel-2*i686*
rpm -Uvh glibc-headers-2*x86_64*
rpm -Uvh elfutils-libelf-0*x86_64*
rpm -Uvh elfutils-libelf-devel-0*x86_64*
rpm -Uvh gcc-4*x86_64*
rpm -Uvh gcc-c++-4*x86_64*
rpm -Uvh ksh-*x86_64*
rpm -Uvh libaio-0*x86_64*
rpm -Uvh libaio-devel-0*x86_64*
rpm -Uvh libaio-0*i686*
rpm -Uvh libaio-devel-0*i686*
rpm -Uvh libgcc-4*x86_64*
rpm -Uvh libgcc-4*i686*
rpm -Uvh libstdc++-4*x86_64*
rpm -Uvh libstdc++-4*i686*
rpm -Uvh libstdc++-devel-4*x86_64*
rpm -Uvh make-3.81*x86_64*
rpm -Uvh numactl-devel-2*x86_64*
rpm -Uvh sysstat-9*x86_64*
rpm -Uvh compat-libstdc++-33*i686*
rpm -Uvh compat-libcap*
cd /
eject

This will install all the necessary 32-bit packages for 11.2.0.1. From 11.2.0.2 onwards
many of these are unnecessary, but having them present does not cause a problem.
Create the new groups and users.

groupadd -g 501 oinstall


groupadd -g 502 dba
groupadd -g 503 oper
groupadd -g 504 asmadmin
groupadd -g 506 asmdba
groupadd -g 505 asmoper

useradd -u 502 -g oinstall -G dba,asmdba,oper oracle


passwd oracle

We are not going to use the "asm" groups, since this installation will not use ASM.

Additional Setup
Set the password for the "oracle" user.

passwd oracle

Amend the "/etc/security/limits.d/90-nproc.conf" file as described below. See MOS Note


[ID 1487773.1]

# Change this
* soft nproc 1024
# To this
* - nproc 16384

Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the
SELINUX flag is set as follows.

SELINUX=permissive

Once the change is complete, restart the server.


If you have the Linux firewall enabled, you will need to disable or configure it, as
shown here or here.
Create the directories in which the Oracle software will be installed.

mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

Login as root and issue the following command.

xhost +<machine-name>

Login as the oracle user and add the following lines at the end of the ".bash_profile" file.

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=ol6-112.localdomain; export ORACLE_HOSTNAME


ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID

PATH=/usr/sbin:$PATH; export PATH


PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY
environmental variable.

DISPLAY=<machine-name>:0.0; export DISPLAY

Start the Oracle Universal Installer (OUI) by issuing the following command in the
database directory.

./runInstaller

Proceed with the installation of your choice. The prerequisites checks will fail for the
following version-dependent reasons:

11.2.0.1: The installer shows multiple "missing package" failures because it does
not recognize several of the newer version packages that were installed. These
"missing package" failures can be ignored as the packages are present. The
failure for the "pdksh" package can be ignored because we installed the "ksh"
package in its place.
11.2.0.2: The installer should only show a single "missing package" failure for the
"pdksh" package. It can be ignored because we installed the "ksh" package in its
place.
11.2.0.3: The installer shows no failures and continues normally.

You can see the type of installation I performed by clicking on the links below to see
screen shots of each stage.
If you are doing an installation for an Enterprise Manager repository, remember to do
an advanced installation and pick the ALT32UTF8 character set.

1. Configure Security Updates


2. Select Install Option
3. System Class
4. Node Selection
5. Select Install Type
6. Typical Install Configuration
7. Create Inventory
8. Perform Prerequisite Checks
9. Summary
10. Install Product
11. Database Configuration Assistant
12. Database Configuration Assistant 2
13. Execute Configuration Scripts
14. Finish

Post Installation
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.

DB11G:/u01/app/oracle/product/11.2.0/db_1:Y

Common Errors
"error code 35" : The machine name in the "/etc/hosts" file is not correct. It needs
an entry for the loopback adapter (localhost) and the machine name. If you are
using DNS for name resolution, you still need the loopback adapter reference in
this file.
"error code 37" : The DNS not working properly. You may also get this error is
the "/etc/hosts" file is not configured correctly.
"sqlplus: error while loading shared libraries: libclntsh.so.11.1" : The prerequisites
have not been met. Work through them again. Specifically, make sure the "gcc"
package has been installed.
Listener fails to start - Typically this is due to incorrect name resolution. Make
sure the "/etc/hosts" and/or DNS is configured correctly.
Linking errors - Almost always due to missing prerequisites. Review the setup
sections.
For more information see:

Oracle Database Installation Guide 11g Release 2 (11.2) for Linux


Automating Database Startup and Shutdown on Linux
Oracle Universal Installer (OUI) Silent Installations

Hope this helps. Regards Tim...

Oracle Database 11g Release 2 (11.2) Installation On


Oracle Linux 7 (OL7)
Oracle Linux 7 is a production release, but the Oracle Database is only supported on it
from Oracle Database 11g (11.2.0.4) onward. This installation should not be used for a
real system when using database versions prior to 11.2.0.4.
This article describes the installation of Oracle Database 11g Release 2 (11.2.0.4) 64-
bit on Oracle Linux 7 (OL7) 64-bit. The article is based on a server installation with a
minimum of 2G swap and secure Linux set to permissive. An example of this type of
Linux installation can be seen here.

Download Software
Unpack Files
Hosts File
Oracle Installation Prerequisites

o Automatic Setup
o Manual Setup
o Additional Setup
Installation
Post Installation

Download Software
Download the Oracle software using one of the two link below. If you have access to My
Oracle Support (MOS), then it is better to download the 11.2.0.4 version, since this is
the first release of 11.2 that is supported on Oracle Linux 7.

Oracle Database 11g Release 2 (11.2.0.4) Software (MOS)


Oracle Database 11g Release 2 (11.2.0.1) Software (OTN)

Unpack Files
Unzip the files.

unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip

You should now have a single directory called "database" containing installation files.

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.loca
ldomain4
192.168.0.215 ol7.localdomain ol7

Set the correct hostname in the "/etc/hostname" file.

ol7.localdomain

Oracle Installation Prerequisites


Perform either the Automatic Setup or the Manual Setup to complete the basic
prerequisites. The Additional Setup is required for all installations.

Automatic Setup
If you plan to use the "oracle-rdbms-server-11gR2-preinstall" package to perform all
your prerequisite setup, follow the instructions at http://public-yum.oracle.com to setup
the yum repository for OL, then perform the following command.

# yum install oracle-rdbms-server-11gR2-preinstall

All necessary prerequisites will be performed automatically.


It is probably worth doing a full update as well, but this is not strictly speaking
necessary.

# yum update

Manual Setup
If you have not used the "oracle-rdbms-server-11gR2-preinstall" package to perform all
prerequisites, you will need to manually perform the following setup tasks.
Add or amend the following lines in the "/etc/sysctl.conf" file.

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586

Run the following command to change the current kernel parameters.

/sbin/sysctl -p

Add the following lines to 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

Add the following line to the "/etc/pam.d/login" file, if it does not already exist.

session required pam_limits.so

The following packages are listed as required, including the 32-bit version of some of
the packages. Many of the packages should be installed already.

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 elfutils-libelf-devel -y

Create the new groups and users.

groupadd -g 54321 oinstall


groupadd -g 54322 dba
groupadd -g 54323 oper
#groupadd -g 54324 backupdba
#groupadd -g 54325 dgdba
#groupadd -g 54326 kmdba
#groupadd -g 54327 asmdba
#groupadd -g 54328 asmoper
#groupadd -g 54329 asmadmin

useradd -g oinstall -G dba,oper oracle

We are not going to use the extra groups, but include them if you do plan on using
them.

Additional Setup
The following steps must be performed, whether you did the manual or automatic setup.
Set the password for the "oracle" user.

passwd oracle

Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the
SELINUX flag is set as follows.

SELINUX=permissive

Once the change is complete, restart the server or run the following command.

# setenforce Permissive
If you have the Linux firewall enabled, you will need to disable or configure it, as
shown here or here. To disable it, do the following.

# systemctl stop firewalld


# systemctl disable firewalld

Create the directories in which the Oracle software will be installed.

mkdir -p /u01/app/oracle/product/11.2.0.4/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

Unless you are working from the console, or using SSH tunnelling, login as root and
issue the following command.

xhost +<machine-name>

Add the following lines at the end of the "/home/oracle/.bash_profile" file.

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=ol7.localdomain; export ORACLE_HOSTNAME


ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/db_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH


CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; expo
rt CLASSPATH
Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY
environmental variable.

DISPLAY=<machine-name>:0.0; export DISPLAY

Start the Oracle Universal Installer (OUI) by issuing the following command in the
database directory.

./runInstaller

Proceed with the installation of your choice. You can see type of installation I performed
by clicking on the links below to see screen shots of each stage. The "pdksh" package
will be listed as missing, which can be ignored because we installed the "ksh" package
instead.
If you are doing an installation for an Enterprise Manager repository, remember to do
an advanced installation and pick the ALT32UTF8 character set.

1. Configure Security Updates


2. Select Install Option
3. System Class
4. Node Selection
5. Select Install Type
6. Typical Install Configuration
7. Create Inventory
8. Perform Prerequisite Checks
9. Summary
10. Install Product
11. Database Configuration Assistant
12. Database Configuration Assistant 2
13. Execute Configuration Scripts
14. Finish

During the link phase you will encounter an error invoking the "ins_emagent.mk" file. To
fix this, edit the "$ORACLE_HOME/sysman/lib/ins_emagent.mk", doing a search and
replace for the line shown below.

FROM:
$(MK_EMAGENT_NMECTL)
TO :
$(MK_EMAGENT_NMECTL) -lnnz11
Click the "Retry" button.

Post Installation
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.

DB11G:/u01/app/oracle/product/11.2.0.4/db_1:Y

For more information see:

Oracle Database Installation Guide 11g Release 2 (11.2) for Linux


Automating Database Startup and Shutdown on Linux

Hope this helps. Regards Tim...

Oracle Database 12c Release 1 (12.1) Installation On


Oracle Linux 6
This article describes the installation of Oracle Database 12c Release 1 (12.1) (64-bit)
on Oracle Linux 6 (64-bit). The article is based on a server installation with a minimum
of 2G swap, with SELinux set to permissive and the firewall disabled. The following
package groups were included for this installation.

Base System > Base


Base System > Compatibility libraries
Base System > Hardware monitoring utilities
Base System > Large Systems Performance
Base System > Network file system client
Base System > Performance Tools
Base System > Perl Support
Servers > Server Platform
Servers > System administration tools
Desktops > Desktop
Desktops > Desktop Platform
Desktops > Fonts
Desktops > General Purpose Desktop
Desktops > Graphical Administration Tools
Desktops > Input Methods
Desktops > X Window System
Applications > Internet Browser
Development > Additional Development
Development > Development Tools
An example of this type of Linux installations can be seen here. Alternative installations
may require more packages to be loaded, in addition to the ones listed below.

Download Software
Unpack Files
Hosts File
Oracle Installation Prerequisites

o Automatic Setup
o Manual Setup
o Additional Setup
Installation
Post Installation
Common Errors

Related articles.

Oracle Universal Installations (OUI) Silent Installations


Database Configuration Assistant (DBCA) : Creating Databases in Silent Mode

Download Software
Download the Oracle software from OTN or MOS depending on your support status.

OTN: Oracle Database 12c Release 1 (12.1.0.2) Software (64-bit).


edelivery: Oracle Database 12c Release 1 (12.1.0.2) Software (64-bit)

This article has been updated for the 12.1.0.2 release, but the installation is essentially
unchanged since 12.1.0.1. Any variations specific for 12.1.0.1 will be noted.
Depending on your version of VirtualBox and Oracle Linux, there may be some slight
variation in how the screen shots look.

Unpack Files
Unzip the files.

unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip

You should now have a single directory called "database" containing installation files.

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.localdomain localhost


192.168.0.210 ol6-121.localdomain ol6-121

Oracle Installation Prerequisites


Perform either the Automatic Setup or the Manual Setup to complete the basic
prerequisites. The Additional Setup is required for all installations.

Automatic Setup
If you plan to use the "oracle-rdbms-server-12cR1-preinstall" package to perform all
your prerequisite setup, issue the following command.

# yum install oracle-rdbms-server-12cR1-preinstall -y

Earlier versions of Oracle Linux required manual setup of the Yum repository by
following the instructions at http://public-yum.oracle.com.
It is probably worth doing a full update as well, but this is not strictly speaking
necessary.

# yum update

Manual Setup
If you have not used the "oracle-rdbms-server-12cR1-preinstall" package to perform all
prerequisites, you will need to manually perform the following setup tasks.
Add or amend 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
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

Run the following command to change the current kernel parameters.

/sbin/sysctl -p

Add the following lines to the "/etc/security/limits.conf" file.

oracle soft nofile 1024


oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768

Install the following packages if they are not already present.

# From Public Yum or ULN


yum install binutils -y
yum install compat-libcap1 -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

Create the new groups and users.

groupadd -g 54321 oinstall


groupadd -g 54322 dba
groupadd -g 54323 oper
#groupadd -g 54324 backupdba
#groupadd -g 54325 dgdba
#groupadd -g 54326 kmdba
#groupadd -g 54327 asmdba
#groupadd -g 54328 asmoper
#groupadd -g 54329 asmadmin

useradd -u 54321 -g oinstall -G dba,oper oracle

Uncomment the extra groups you require.

Additional Setup
The following steps must be performed, whether you did the manual or automatic setup.
Set the password for the "oracle" user.

passwd oracle

Amend the "/etc/security/limits.d/90-nproc.conf" file as described below. See MOS Note


[ID 1487773.1]

# Change this
* soft nproc 1024

# To this
* - nproc 16384

Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the
SELINUX flag is set as follows.

SELINUX=permissive

Once the change is complete, restart the server or run the following command.
# setenforce Permissive

If you have the Linux firewall enabled, you will need to disable or configure it, as
shown here or here. To disable it, do the following.

# service iptables stop


# chkconfig iptables off

Create the directories in which the Oracle software will be installed.

mkdir -p /u01/app/oracle/product/12.1.0.2/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

Putting mount points directly under root is typically a bad idea. It's done here for
simplicity, but for a real installation "/" should be reserved for the OS.
Unless you are working from the console, or using SSH tunnelling, login as root and
issue the following command.

xhost +<machine-name>

Add the following lines at the end of the "/home/oracle/.bash_profile" file.

# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=ol6-121.localdomain
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_SID=cdb1

export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY
environmental variable.

DISPLAY=<machine-name>:0.0; export DISPLAY

Start the Oracle Universal Installer (OUI) by issuing the following command in the
database directory.

./runInstaller

Proceed with the installation of your choice.


If you are doing an installation for an Enterprise Manager repository, remember to do
an advanced installation and pick the ALT32UTF8 character set.
You can see the type of installation I performed by clicking on the links below to see
screen shots of each stage.

1. Configure Security Updates


2. My Oracle Support Credentials
3. Select Installation Type
4. System Class
5. Grid Installation Options
6. Select Install Type
7. Typical Install Configuration
8. Create Inventory
9. Perform Prerequisite Checks
10. Summary
11. Install Product
12. Execute Configuration Scripts
13. Oracle Database Configuration
14. Database Configuration Assistant
15. Database Configuration Assistant Complete
16. Finish
17. Database Express 12c Login
18. Database Express 12c Dashboard
The "Database Configuration Assistant Complete" screen displays the Database
Express 12c URL, which will be something like "https://ol6-121.localdomain:5500/em".

Post Installation
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.

cdb1:/u01/app/oracle/product/12.1.0.2/db_1:Y

If Database Express 12c is not working, check the XMLDB HTTP port. If it is 0, set it to
the port you want to use.

SQL> SELECT dbms_xdb_config.gethttpsport FROM dual;

GETHTTPSPORT
------------
5500

SQL> EXEC dbms_xdb_config.sethttpsport(5500);

PL/SQL procedure successfully completed.

SQL>

Common Errors
"error code 35" : The machine name in the "/etc/hosts" file is not correct. It needs
an entry for the loopback adapter (localhost) and the machine name. If you are
using DNS for name resolution, you still need the loopback adapter reference in
this file.
"error code 37" : The DNS not working properly. You may also get this error is
the "/etc/hosts" file is not configured correctly.
"sqlplus: error while loading shared libraries: libclntsh.so.12.1" : The prerequisites
have not been met. Work through them again. Specifically, make sure the "gcc"
package has been installed.
Listener fails to start - Typically this is due to incorrect name resolution. Make
sure the "/etc/hosts" and/or DNS is configured correctly.
Linking errors - Almost always due to missing prerequisites. Review the setup
sections.
For more information see:

Oracle Database Installation Guide 12c Release 1 (12.1) for Linux


Automating Database Startup and Shutdown on Linux
Oracle Universal Installations (OUI) Silent Installations
Database Configuration Assistant (DBCA) : Creating Databases in Silent Mode

Hope this helps. Regards Tim...

Oracle Database 12c Release 1 (12.1) Installation On


Oracle Linux 7 (OL7)
Oracle Linux 7 is a production release, but Oracle Database 12c is only supported on it
from (12.1.0.2) onward. This installation should not be used for a real system when
using 12c database versions prior to 12.1.0.2.
This article describes the installation of Oracle Database 12c Release 1 (12.1) 64-bit on
Oracle Linux 7 (OL7) 64-bit. The article is based on a server installation with a minimum
of 2G swap and secure Linux set to permissive. An example of this type of Linux
installation can be seen here.

Download Software
Unpack Files
Hosts File
Oracle Installation Prerequisites

o Automatic Setup
o Manual Setup
o Additional Setup
Installation
Post Installation
12.1.0.1 Notes
12.1.0.2 Notes

Related articles.

Oracle Universal Installations (OUI) Silent Installations


Database Configuration Assistant (DBCA) : Creating Databases in Silent Mode

Download Software
Download the Oracle software from OTN or MOS depending on your support status.

OTN: Oracle Database 12c Release 1 (12.1.0.2) Software (64-bit).


edelivery: Oracle Database 12c Release 1 (12.1.0.2) Software (64-bit)

Unpack Files
Unzip the files.

unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip

You should now have a single directory called "database" containing installation files.

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.loca


ldomain4
192.168.0.215 ol7.localdomain ol7

Set the correct hostname in the "/etc/hostname" file.

ol7.localdomain

Oracle Installation Prerequisites


Perform either the Automatic Setup or the Manual Setup to complete the basic
prerequisites. The Additional Setup is required for all installations.

Automatic Setup
If you plan to use the "oracle-rdbms-server-12cR1-preinstall" package to perform all
your prerequisite setup, issue the following command.

# yum install oracle-rdbms-server-12cR1-preinstall -y


Earlier versions of Oracle Linux required manual setup of the Yum repository by
following the instructions at http://public-yum.oracle.com.
It is probably worth doing a full update as well, but this is not strictly speaking
necessary.

# yum update -y

It's worth running the all the YUM commands listed in the manual setup section.
Depending on the OS package groups you have selected, some additional packages
might also be needed.

Manual Setup
If you have not used the "oracle-rdbms-server-12cR1-preinstall" package to perform all
prerequisites, you will need to manually perform the following setup tasks.
Add the following lines to the "/etc/sysctl.conf" file, or in a file called "/etc/sysctl.d/98-
oracle.conf".

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

Run the following command to change the current kernel parameters.

/sbin/sysctl -p
Add the following lines to a file called "/etc/security/limits.d/oracle-rdbms-server-12cR1-
preinstall.conf" file.

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

The following packages are listed as required, including the 32-bit version of some of
the packages. Many of the packages should be installed already.

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

Create the new groups and users.

groupadd -g 54321 oinstall


groupadd -g 54322 dba
groupadd -g 54323 oper
#groupadd -g 54324 backupdba
#groupadd -g 54325 dgdba
#groupadd -g 54326 kmdba
#groupadd -g 54327 asmdba
#groupadd -g 54328 asmoper
#groupadd -g 54329 asmadmin

useradd -u 54321 -g oinstall -G dba,oper oracle

Uncomment the extra groups you require.

Additional Setup
The following steps must be performed, whether you did the manual or automatic setup.
Set the password for the "oracle" user.

passwd oracle

Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the
SELINUX flag is set as follows.

SELINUX=permissive

Once the change is complete, restart the server or run the following command.

# setenforce Permissive

If you have the Linux firewall enabled, you will need to disable or configure it, as
shown here or here. To disable it, do the following.

# systemctl stop firewalld


# systemctl disable firewalld

Create the directories in which the Oracle software will be installed.

mkdir -p /u01/app/oracle/product/12.1.0.2/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

Putting mount points directly under root is typically a bad idea. It's done here for
simplicity, but for a real installation "/" should be reserved for the OS.
Unless you are working from the console, or using SSH tunnelling, login as root and
issue the following command.

xhost +<machine-name>

Add the following lines at the end of the "/home/oracle/.bash_profile" file.

# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=ol7.localdomain
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_SID=cdb1

export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY
environmental variable.

DISPLAY=<machine-name>:0.0; export DISPLAY

Start the Oracle Universal Installer (OUI) by issuing the following command in the
database directory.

./runInstaller

Proceed with the installation of your choice.


If you are doing an installation for an Enterprise Manager repository, remember to do
an advanced installation and pick the ALT32UTF8 character set.
Check out the notes below for how to deal with potential errors that may arise during the
installation.
You can see the type of installation I performed by clicking on the links below to see
screen shots of each stage.

1. Configure Security Updates


2. My Oracle Support Credentials
3. Select Installation Type
4. System Class
5. Grid Installation Options
6. Select Install Type
7. Typical Install Configuration
8. Create Inventory
9. Perform Prerequisite Checks
10. Summary
11. Install Product
12. Execute Configuration Scripts
13. Oracle Database Configuration
14. Database Configuration Assistant
15. Database Configuration Assistant Complete
16. Finish
17. Database Express 12c Login
18. Database Express 12c Dashboard

The "Database Configuration Assistant Complete" screen displays the Database


Express 12c URL, which will be something like "https://ol7.localdomain:5500/em".

Post Installation
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.

cdb1:/u01/app/oracle/product/12.1.0.2/db_1:Y

12.1.0.1 Notes
Only follow these notes if you are attempting the install using 12.1.0.1, there are a
number of things that will need to be fixed along the way. These are not necessary for a
12.1.0.2 installation, as it completes cleanly.
The following steps need to be considered during the installation.
When clicking "Next" on the "Download Software Updates" screen you will get
the following message. Click the "Yes" button.
"[INS-13001] Environment does not meet minimum requirements.

Are you sure you want to continue?

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

Error in invoking target 'links proc gen_pcscfg procob' of makefile


'/u01/app/oracle/product/12.1.0.1/db_1/precomp/lib/ins_precomp.mk'.
See
'/u01/app/oraInventory/logs/installActions2014-04-26_08-07-04PM.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_rd
bms.mk.orig

Perform the following modifications to the


"$ORACLE_HOME/rdbms/lib/env_rdbms.mk" file.

# 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) -W
l,--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.


Later, you might see the following error.

Error in invoking target 'install' of makefile


'/u01/app/oracle/product/12.1.0.1/db_1/ctx/lib/ins_ctx.mk'.
See
'/u01/app/oraInventory/logs/installActions2014-04-26_08-07-04PM.log'

for details.

To fix it, do the following:

rm -rf $ORACLE_HOME/lib/stubs/*
cp $ORACLE_HOME/ctx/lib/env_ctx.mk $ORACLE_HOME/ctx/lib/env_ctx.mk.o
rig

Perform the following modifications to the "$ORACLE_HOME/ctx/lib/env_ctx.mk"


file.

# Line 154
# FROM:
LINK=$(LDCCOM)
# TO :
LINK=$(LDCCOM) --Wl,--no-as-needed

Click the "Retry" button.


Due to the issues during the linking phase, it probably makes sense to do a relink once
the installation is complete.

dbshut $ORACLE_HOME
cd $ORACLE_HOME/bin
./relink all
# Following line should return no errors.
grep -i err $ORACLE_HOME/install/relink.log
dbstart $ORACLE_HOME

12.1.0.2 Notes
During the linking phase, you may see the following error.

Error in invoking target 'irman ioracle' of makefile '/u01/app/oracle/prod


uct/12.1.0.2/db_1/rdbms/lib/ins_rdbms.mk'

To fix it, run the following command as the "oracle" user, then click the "Retry" button.

cp $ORACLE_HOME/javavm/jdk/jdk6/lib/libjavavm12.a $ORACLE_HOME/lib/

During the database creation as part of the installation, or after when using the DBCA,
you may get the following error.

Error while executing "/u01/app/oracle/product/12.1.0.2/db_1/rdbms/admin/d


bmssml.sql". Refer to "/u01/app/oracle/cfgtoollogs/dbca/orcl/dbmssml0.log"
for more details. Error in Process: /u01/app/oracle/product/12.1.0.2/db_1/
perl/bin/perl

To fix it, follow the instructions to rebuild Perl as described towards the end of this post
by Laurent Leturgez. You will have to redo the database creation.
For more information see:

Oracle Database Installation Guide 12c Release 1 (12.1) for Linux


Automating Database Startup and Shutdown on Linux
Oracle Universal Installations (OUI) Silent Installations
Database Configuration Assistant (DBCA) : Creating Databases in Silent Mode

Hope this helps. Regards Tim...

Oracle Database 12c Release 2 (12.2) Installation On


Oracle Linux 6 (OL6) and 7 (OL7)
This article describes the installation of Oracle Database 12c Release 2 (12.2) 64-bit on
Oracle Linux 6 (OL6) and 7 (OL7) 64-bit. The article is based on a server installation
with a minimum of 2G swap and secure Linux set to permissive. An example of this type
of Linux installation can be seen here (OL6 or OL7).

Download Software
Unpack Files
Hosts File
Oracle Installation Prerequisites

o Automatic Setup
o Manual Setup
o Additional Setup
Installation
Post Installation

Related articles.

Oracle Universal Installations (OUI) Silent Installations


Database Configuration Assistant (DBCA) : Creating Databases in Silent Mode

Download Software
Download the Oracle software from OTN or MOS depending on your support status.

OTN: Oracle Database 12c Release 2 (12.2.0.1) Software (64-bit).


edelivery: Oracle Database 12c Release 2 (12.2.0.1) Software (64-bit)

Unpack Files
Unzip the file.

unzip linuxx64_12201_database.zip

You should now have a single directory called "database" containing installation files.
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.loca


ldomain4
192.168.56.107 ol7-122.localdomain ol7-122

Set the correct hostname in the "/etc/hostname" file.

ol7-122.localdomain

Oracle Installation Prerequisites


Perform either the Automatic Setup or the Manual Setup to complete the basic
prerequisites. The Additional Setup is required for all installations.

Automatic Setup
If you plan to use the "oracle-database-server-12cR2-preinstall" package to perform all
your prerequisite setup, issue the following command.

# yum install oracle-database-server-12cR2-preinstall -y

It is probably worth doing a full update as well, but this is not strictly speaking
necessary.

# yum update -y

It's worth running the all the YUM commands listed in the manual setup section.
Depending on the OS package groups you have selected, some additional packages
might also be needed.

Manual Setup
If you have not used the "oracle-database-server-12cR2-preinstall" package to perform
all prerequisites, you will need to manually perform the following setup tasks.
Add the following lines to the "/etc/sysctl.conf" file, or in a file called "/etc/sysctl.d/98-
oracle.conf".

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

Run the following command to change the current kernel parameters.

/sbin/sysctl -p

Add the following lines to a file called "/etc/security/limits.d/oracle-database-server-


12cR2-preinstall.conf" file.

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
Someone in the comments suggested you might need to add the previous lines into the
"/etc/security/limits.conf" file also for CentOS7. This is definitely not needed for OL7, but
worth considering if the installer gives prerequisite failures for these settings.
The following packages are listed as required, including the 32-bit version of some of
the packages. Many of the packages should be installed already.

# 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

# Required for 12.1, not listed for 12.2


yum install gcc -y
yum install gcc-c++ -y
yum install libXext -y
yum install libXext.i686 -y
yum install zlib-devel -y
yum install zlib-devel.i686 -y

# OL6 only (RHEL6 only)


yum install e2fsprogs -y
yum install e2fsprogs-libs -y
yum install libs -y
yum install libxcb.i686 -y
yum install libxcb -y

Create the new groups and users.


groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
#groupadd -g 54324 backupdba
#groupadd -g 54325 dgdba
#groupadd -g 54326 kmdba
#groupadd -g 54327 asmdba
#groupadd -g 54328 asmoper
#groupadd -g 54329 asmadmin
#groupadd -g 54330 racdba

useradd -u 54321 -g oinstall -G dba,oper oracle

Uncomment the extra groups you require.

Additional Setup
The following steps must be performed, whether you did the manual or automatic setup.
Set the password for the "oracle" user.

passwd oracle

Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the
SELINUX flag is set as follows.

SELINUX=permissive

Once the change is complete, restart the server or run the following command.

# setenforce Permissive

If you have the Linux firewall enabled, you will need to disable or configure it, as
shown here or here. To disable it, do the following.

# systemctl stop firewalld


# systemctl disable firewalld
If you are not using Oracle Linux and UEK, you will need to manually disable
transparent huge pages.
Create the directories in which the Oracle software will be installed.

mkdir -p /u01/app/oracle/product/12.2.0.1/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

Putting mount points directly under root is typically a bad idea. It's done here for
simplicity, but for a real installation "/" should be reserved for the OS.
Unless you are working from the console, or using SSH tunnelling, login as root and
issue the following command.

xhost +<machine-name>

The scripts are created using the cat command, with all the "$" characters escaped. If
you want to manually create these files, rather than using the cat command, remember
to remove the "\" characters before the "$" characters.
Create a "scripts" directory.

mkdir /home/oracle/scripts

Create an environment file called "setEnv.sh".

cat > /home/oracle/scripts/setEnv.sh <<EOF


# Oracle Settings
export TMP=/tmp
export TMPDIR=\$TMP

export ORACLE_HOSTNAME=ol7-122.localdomain
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=\$ORACLE_BASE/product/12.2.0.1/db_1
export ORACLE_SID=cdb1

export PATH=/usr/sbin:/usr/local/bin:\$PATH
export PATH=\$ORACLE_HOME/bin:\$PATH

export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
EOF

Add a reference to the "setEnv.sh" file at the end of the "/home/oracle/.bash_profile" file.

echo ". /home/oracle/scripts/setEnv.sh" >> /home/oracle/.bash_profile

Create a "start_all.sh" and "stop_all.sh" script that can be called from a


startup/shutdown service. Make sure the ownership and permissions are correct.

cat > /home/oracle/scripts/start_all.sh <<EOF


#!/bin/bash
. /home/oracle/scripts/setEnv.sh

export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES

dbstart \$ORACLE_HOME
EOF

cat > /home/oracle/scripts/stop_all.sh <<EOF


#!/bin/bash
. /home/oracle/scripts/setEnv.sh

export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES
dbshut \$ORACLE_HOME
EOF

chown -R oracle.oinstall /home/oracle/scripts


chmod u+x /home/oracle/scripts/*.sh

Once the installation is complete and you've edited the "/etc/oratab", you should be able
to start/stop the database with the following scripts run from the "oracle" user.

~/scripts/start_all.sh
~/scripts/stop_all.sh

You can see how to create a Linux service to automatically start/stop the database here
(OL6, OL7).

Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY
environmental variable.

DISPLAY=<machine-name>:0.0; export DISPLAY

Start the Oracle Universal Installer (OUI) by issuing the following command in the
database directory.

./runInstaller

Proceed with the installation of your choice.


You can see the type of installation I performed by clicking on the links below to see
screen shots of each stage.

1. Configure Security Updates


2. Select Install Option
3. Select System Class
4. Select Database Installation Option
5. Select Install Type
6. Typical Install Configuration
7. Create Inventory
8. Perform Prerequisite Checks
9. Summary
10. Install Product
11. Execute Configuration Scripts
12. Database Configuration Assistant
13. Finish
14. Database Express 12c Login
15. Database Express 12c Dashboard

The "Database Configuration Assistant Complete" screen displays the Database


Express 12c URL, which will be something like "https://ol7-122.localdomain:5500/em".

Post Installation
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.

cdb1:/u01/app/oracle/product/12.2.0.1/db_1:Y

For more information see:

Oracle Database Installation Guide 12c Release 2 (12.2) for Linux


Automating Database Startup and Shutdown on Linux
Oracle Universal Installations (OUI) Silent Installations
Database Configuration Assistant (DBCA) : Creating Databases in Silent Mode

Hope this helps. Regards Tim...

Recovery Manager (RMAN) Enhancements in Oracle


Database 11g Release 1
This article provides an overview of all the RMAN enhancements in Oracle Database
11g Release 1, including the following.

Improved Integration with Data Guard


Improved Handling of Long-Term Backups
Archived Redo Log Failover
Archived Log Deletion Policy Enhancements
Network-Enabled Database Duplication Without Backups
Recovery Catalog Enhancements

o Virtual Private Catalog


o IMPORT CATALOG
Multisection Backups
Undo Optimization
Improved Block Media Recovery Performance
Faster Backup Compression
Block Change Tracking Support for Standby Databases
Improved Scripting with RMAN Substitution Variables
Integration with VSS-Enabled Applications
Lost Write Detection
Backup of Read-Only Transportable Tablespaces
Improved Media Recovery Performance for Databases on SMP Systems

Related Articles.

Recovery Manager in Oracle 8i


Recovery Manager in Oracle 9i
Recovery Manager (RMAN) Enhancements In Oracle 9i
Recovery Manager (RMAN) Enhancements in Oracle Database 10g
Recovery Manager (RMAN) Enhancements in Oracle Database 11g Release 1
Data Recovery Advisor
Improved Block Corruption Detection (VALIDATE)
Backup and Recovery Enhancements in Oracle Enterprise Manager
Flashback Transaction
Flashback Data Archive (Oracle Total Recall)
Incrementally Updated Backups : Rolling Forward Image Copies Using RMAN

Improved Integration with Data Guard


When RMAN is in a Data Guard environment, the CONFIGURE command allows you to
register and configure settings for all physical databases. The databases are
distinguished using the DB_UNIQUE_NAME initialization parameter.
A catalog must be connected for RMAN to work properly in a Data Guard environment.
Using the SET DBID command allows you to configure a standby database even when
RMAN is not connected to the target database. This means a standby database
configuration can be created before the database itself exists.
The CONFIGURE DB_UNIQUE_NAME command defines a connection to a physical standby
database. This implicitly registers the new database, as does the first connection
as TARGET to a new standby database. The CONFIGURE ... FOR
DB_UNIQUE_NAME configures settings for the specified database or for all databases in the
environment.

# Defines a new connection to a physical standby database.


CONFIGURE DB_UNIQUE_NAME 'STANDBY' CONNECT IDENTIFIER 'STANDBY';
# Configures settings for the physical standby database.
CONFIGURE DEFAULT DEVICE TYPE TO DISK FOR DB_UNIQUE_NAME 'STANDBY';

# Configures settings for the all databases.


CONFIGURE DEFAULT DEVICE TYPE TO DISK FOR DB_UNIQUE_NAME ALL;

The SHOW ... FOR DB_UNIQUE_NAME command shows the configuration for a specific
standby database or all known databases.

# Show configuration of a specific standby database.


SHOW ALL FOR DB_UNIQUE_NAME 'STANDBY';

# Show configuration of all databases.


SHOW RETENTION POLICY FOR DB_UNIQUE_NAME ALL;

Improved Handling of Long-Term Backups


The BACKUP command includes a KEEP option to override the default retention policy and
create an all-inclusive backup. The backups are considered all-inclusive because they
contain all files necessary to restore and recover the database. This allows for long term
backups, also known as archival backups.
In previous versions, an archival backup would include all archived redo logs present.
Oracle 11g has improved this situation by retaining only the archived redo log files
needed to make the backup consistent. This may represent a substantial space saving.

Archived Redo Log Failover


When backing up archived redo logs RMAN only includes a single copy of each
archived redo log, regardless of how many archive log destinations are being written to.
The Oracle 11g archived redo log failover feature allows RMAN to complete a backup
provided at least one valid copy of each archived redo log is present in one of the
specified archive destinations. If RMAN finds a log file containing corrupt blocks, it
searches the other archive destinations for a valid copy to back up.

Archived Log Deletion Policy Enhancements


The archived log deletion policy of Oracle 11g has been extended to give greater
flexibility and protection in a Data Guard environment. The Oracle 10g and Oracle 11g
syntax is displayed below.
# Oracle 10g Syntax.
CONFIGURE ARCHIVELOG DELETION POLICY {CLEAR | TO {APPLIED ON STANDBY | NON
E}}

# Oracle 11g Syntax.


ARCHIVELOG DELETION POLICY {CLEAR | TO {APPLIED ON [ALL] STANDBY |
BACKED UP integer TIMES TO DEVICE TYPE deviceSpecifier |
NONE | SHIPPED TO [ALL] STANDBY}
[ {APPLIED ON [ALL] STANDBY | BACKED UP integer TIMES TO DEVICE TYPE dev
iceSpecifier |
NONE | SHIPPED TO [ALL] STANDBY}]...}

The extended syntax allows for configurations where logs are eligible for deletion only
after being applied to, or transferred to, one or more standby database destinations.

Network-Enabled Database Duplication Without Backups


Prior to Oracle 11g, an RMAN database duplication to a different host required copies of
the relevant backups and archived redo logs to be manually copied to the remote
server. Oracle 11g allows active database duplication, so there is no need for the
presence of pre-existing database backups and manual copying of files.
Once the DUPLICATE command is initiated, RMAN automatically performs the following
steps.

Copies the spfile to the destination server.


Starts the auxiliary instance with the spfile.
Copies the relevant database files and archived redo logs over the network to the
destination server.
Recovers the database.
Opens the database with the RESETLOGS option.

This method is suitable for creating a duplicate database or physical standby database.

Recovery Catalog Enhancements

Virtual Private Catalog


Oracle 11g has introduced the concept of the virtual private catalog, which is a subset of
the base recovery catalog. The owner of the base recovery catalog can now GRANT or
REVOKE access on individual databases to other users in the same database. To
create a virtual private catalog, you must log in to SQL*Plus as SYS and create a
database user with the RECOVERY_CATALOG_OWNER role.

CREATE USER vpc1 IDENTIFIED BY vpc1 QUOTA UNLIMITED ON users;


GRANT RECOVERY_CATALOG_OWNER TO vpc1;

Next, log into RMAN using the base recovery catalog owner and grant access on the
relevant databases to the virtual private catalog user. The database can be specified
using the database name or the DBID.

$ rman
RMAN> CONNECT CATALOG rman/rman;
RMAN> GRANT CATALOG FOR DATABASE db11g TO vpc1;

Grant succeeded.

RMAN>

The following grant will allow the virtual private catalog to register new target databases.

RMAN> GRANT REGISTER DATABASE TO vpc1;

Grant succeeded.

RMAN>

Next, log into RMAN using the virtual private catalog owner and issue the CREATE
VIRTUAL CATALOG command.

$ rman
RMAN> CONNECT CATALOG vpc1/vpc1;
RMAN> CREATE VIRTUAL CATALOG;

found eligible base catalog owned by RMAN


created virtual catalog against base catalog owned by RMAN
RMAN>

If the catalog is to be used for releases earlier than Oracle 11g, log into SQL*Plus as
the virtual private catalog owner and run the following procedure, where "rman"
represents the name of the base catalog owner.

SQL> CONN vpc1/vpc1


Connected.
SQL> EXEC rman.DBMS_RCVCAT.CREATE_VIRTUAL_CATALOG;

PL/SQL procedure successfully completed.

SQL>

To revoke privileges from a virtual private catalog, log into RMAN as the base catalog
owner and revoke access to the relevant databases as follows.

REVOKE CATALOG FOR DATABASE db11g FROM vpc1;

# Prevent it from registering new targets if necessary.


REVOKE REGISTER DATABASE FROM vpc1;

The method used to drop the virtual private catalog varies depending on the database
versions of the targets that were registered with it. If only 11g targets were registered,
log on to RMAN as the virtual private catalog owner and issue the following command.

$ rman
RMAN> CONNECT CATALOG vpc1/vpc1;
RMAN> DROP CATALOG;

If targets prior to 11g were registered, connect to SQL*Plus as the virtual private catalog
owner and run the following procedure, where "rman" represents the name of the base
catalog owner.

SQL> CONN vpc1/vpc1


Connected.
SQL> EXEC rman.DBMS_RCVCAT.DROP_VIRTUAL_CATALOG;

PL/SQL procedure successfully completed.

SQL>

You are now safe to drop the virtual private catalog user.

SQL> CONN / AS SYSDBA


Connected.
SQL> DROP USER vpc1 CASCADE;

User dropped.

SQL>

IMPORT CATALOG
Oracle 11g has also introduced the IMPORT CATALOG command to allow recovery
catalogs to be merged or moved. Connect to the destination catalog and issue
the IMPORT CATALOGcommand, specifying the owner of the source catalog.

$ rman
RMAN> CONNECT CATALOG rman2/rman2
RMAN> IMPORT CATALOG rman@db11g;

Starting import catalog at 07-JAN-08


source recovery catalog database Password:
connected to source recovery catalog database
import validation complete
database unregistered from the source recovery catalog
Finished import catalog at 07-JAN-08
RMAN>

Each target imported is unregistered from the source catalog. The import can be limited
to a subset of the catalog by specifying the DBID or DB_NAME of each target to import.

RMAN> IMPORT CATALOG rman@db11g DBID=1423241, 1423242;


RMAN> IMPORT CATALOG rman@db11g DB_NAME=prod3, prod4;

The version of the source catalog must match that of the RMAN executable for the
import to be successful.
To move an entire catalog to a new server, simply create a user on the new server to
act as the catalog owner, create a catalog and import the contents of the existing
catalog into it.

$ sqlplus / as sysdba
SQL> CREATE USER rman2 IDENTIFIED BY rman2 QUOTA UNLIMITED ON rman_ts;
SQL> GRANT RECOVERY_CATALOG_OWNER TO rman2;
SQL> EXIT;

$ rman catalog=rman2/rman2
RMAN> CREATE CATALOG;
RMAN> IMPORT CATALOG rman@db11g;

Multisection Backups
A file section is defined as a contiguous range of blocks from a single file. The SECTION
SIZE parameter in the BACKUP command tells RMAN to create a backup set where each
backup piece contains the blocks from one file section, allowing the backup of large files
to be parallelized across multiple channels.
The following example of a multisection backup sets the parallelism to 4, allowing a
tablespace with a single 1000M datafile to be backed up in 4x250M sections.

# One-off configuration of device type and parallelism.


CONFIGURE DEVICE TYPE sbt PARALLELISM 4;
CONFIGURE DEFAULT DEVICE TYPE TO sbt;
# Backup large tablespace in 4 sections.
RUN {
BACKUP SECTION SIZE 250M TABLESPACE my_1000M_ts;
}

Some points to remember about multisection backups include:

If the section size is larger than the file size, RMAN does not use a multisection
backup for the file.
If the section size is so small that more than 256 sections would be produced,
RMAN increases the section size such that 256 sections will be created.
SECTION SIZE and MAXPIECESIZE cannot be used together.
A backup set never contains a partial datafile, regardless of whether or not it is a
multisection backup.

Undo Optimization
The BACKUP command no longer backs up undo that is not needed for recovery. As the
majority of the undo tablespace is filled with undo generated for transactions that have
subsequently been committed, this can represent a substantial saving.
This functionality is not configurable. It is not affected by the CONFIGURE BACKUP
OPTIMIZATION {ON | OFF} command.

Improved Block Media Recovery Performance


If flashback logs are present, RMAN will use these in preference to backups during
block media recovery (BMR), which can significantly improve BMR speed.

Faster Backup Compression


RMAN now supports the ZLIB binary compression algorithm as part of the Oracle
Advanced Compression option. The ZLIB algorithm is optimized for CPU efficiency, but
produces larger zip files than the BZIP2 algorithm available previously, which is
optimized for compression. The choice of compression algorithm is set using
the CONFIGURE command.

CONFIGURE COMPRESSION ALGORITHM 'ZLIB';


CONFIGURE COMPRESSION ALGORITHM 'BZIP2';

To perform a compressed backup using the ZLIB algorithm you might do something like
this.
# One-off configuration.
CONFIGURE COMPRESSION ALGORITHM 'ZLIB';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPS
ET;

# Backup.
BACKUP DATABASE PLUS ARCHIVELOG;

Block Change Tracking Support for Standby Databases


Block change tracking is now supported on physical standby databases, which in turn
means fast incremental backups are now possible on standby databases.

Improved Scripting with RMAN Substitution Variables


Substitution variables can now be used in RMAN command scripts in a similar manner
to SQL*Plus scripts. For example, the following command script requires a tag name to
be entered for each backup run.

CONNECT TARGET /
BACKUP DATABASE TAG '&1';
BACKUP ARCHIVELOG ALL TAG '&2';
EXIT;

Notice the "&1" and "&2" placeholders. Assuming this were saved with a filename of
"/scripts/backup.cmd", it might be called with the following syntax.

$ rman @'/tmp/backup.cmd' USING DB_20070108 ARCH_20070108

Notice the use of the USING keyword, which accepts a space-separated list of values
that are substituted for the placeholders.

Integration with VSS-Enabled Applications


The Volume Shadow Copy Service (VSS) infrastructure on Windows allows VS enabled
applications to make a shadow copy of open files on Windows servers. The Oracle VSS
writer integrates with VSS-enabled software and storage systems to back up and
restore an Oracle database.
Lost Write Detection
A lost write happens when Oracle writes a block to disk and the I/O subsystem signals
the write is complete, even though it isn't. When the block is next read the stale data is
returned, which can result in data corruption.
The DB_LOST_WRITE_PROTECT parameter can provide protection against lost writes
depending on the value set:

NONE - No lost write protection. The default.


TYPICAL - The instance logs buffer cache reads for read/write tablespaces in the
redo log. This has a approximate overhead of 5-10% in a RAC environment.
FULL - The instance logs buffer cache reads for read/write and read-only
tablespaces in the redo log. This has a approximate overhead of 20% in a RAC
environment.

Lost write detection is most effective in Data Guard environments. Once the primary
and standby databases are protected, the SCNs of blocks applied to the standby
database are compared to the SCN logged in the redo logs. If the SCN on the primary
database is smaller than the SCN on the standby database, a lost write on the primary
database has occurred and is signaled with an external error (ORA-752). At this point
you should failover to the standby database. If the SCN on the primary database is
bigger than on the standby database, a lost write on the standby database has occured
and is signalled with an internal error (ORA-600 [3020]). At this point the standby
database should be recreated.
Lost write protection can also be used in normal databases, although there is no signal
that the lost write has occurred. If you suspect a problem due to inconsistent data, you
must recovery the database to the SCN of the stale block from a backup taken before
the suspected problem occurred. This restore operation will generate the lost write error
(ORA-752). If the error is detected during a recovery, you have no alternative but to
open the database with the RESETLOGS option. All data after this point is lost.

Backup of Read-Only Transportable Tablespaces


In previous versions of Oracle, transportable tablespaces could only be backed up if
they were in read/write mode. It is now possible to backup read-only transportable
tablespaces.

Improved Media Recovery Performance for Databases on SMP


Systems
Several performance improvements have been made to media recovery on symmetric
multiprocessing (SMP) systems with no extra configuration steps, including:

Greater parallelism.
More efficient asynchronous redo read, parse, and apply.
Fewer synchronization points in the parallel apply algorithm.
The media recovery checkpoint at a redo log boundary no longer blocks the
apply of the next log.

There are new parallel recovery wait events for tuning purposes.
For more information see:

What's New in Backup and Recovery?


Data Recovery Advisor
Flashback and LogMiner Enhancements in Oracle Database 11g Release 1

Hope this helps. Regards Tim...

https://oracle-
base.com

You might also like