Вы находитесь на странице: 1из 62

Free Solaris 11 Download

Learn How to Take Advantage of the


Advanced Features of Oracle Solaris

DBA Tips Archive for Oracle

Install Oracle Database 11g R2 on Linux using Oracle ASM - (OL5)


by Jeff Hunter, Sr. Database Administrator

Contents
Introduction
Example Configuration
Install the Linux Operating System
Install Required Linux Packages for Oracle
Create oracle User and Directories
Configure the Linux Operating System for Oracle
Network Configuration
Configure Disks for Oracle ASM
Download Oracle Software
Pre-Installation Tasks
Install Oracle Grid Infrastructure for a Standalone Server
Post-installation Tasks for Oracle Grid Infrastructure for a Standalone Server
Create Separate ASM Disk Group for the Fast Recovery Area
Install Oracle Database
Install Oracle Database Examples
Create the Oracle Database
Post Database Creation Tasks - (Optional)
Configure Automatic Database Starting and Stopping
Managing Oracle Restart Components
Miscellaneous Options
Troubleshooting
About the Author

Introduction
This article is a comprehensive guide for installing Oracle Database 11g Release 2 (11.2) on the Oracle Linux 5 (OL5) operating environment using Oracle Automatic Storage Management (Oracle ASM) and
Oracle Restart. Oracle ASM provides a virtualization layer between the database and storage so that multiple disks can be treated as a single disk group and disks can be dynamically added or removed while
keeping databases online. The example database created in this guide will use Oracle ASM for all physical database file storage (data files, control files, online redo log files, Fast Recovery Area).
Oracle ASM
Oracle Automatic Storage Management (Oracle ASM) is a volume manager and a file system for Oracle database files that supports single-instance Oracle Database and Oracle Real Application Clusters
(Oracle RAC) configurations. Oracle ASM simplifies database administration by eliminating the need for the DBA to directly manage potentially thousands of Oracle database files requiring only the management

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

of groups of disks allocated to the Oracle Database. Oracle ASM also supports a general purpose file system for application needs including Oracle Database binaries; however, storing the Oracle software in
Oracle ASM will not be covered in this guide. Oracle ASM is Oracle's recommended storage management solution that provides an alternative to conventional volume managers, file systems, and raw devices.
Oracle ASM is built into the Oracle kernel. All of the files and directories to be used for Oracle will be contained in an Oracle ASM disk group. Oracle ASM automatically performs load balancing in parallel
across all available disk drives to prevent hot spots and maximize performance, even with rapidly changing data usage patterns.
In previous releases, Oracle ASM was installed as part of the Oracle Database installation. With Oracle Database 11g Release 2, Oracle ASM is part of an Oracle Grid Infrastructure installation, either for a
cluster, or for a standalone server. This guide demonstrates how to create a single instance (non-RAC) database using Oracle ASM and therefore will require Oracle Database 11g Release 2 Grid
Infrastructure for a Standalone Server to be installed before the Oracle Database software. Using the latest Optimal Flexible Architecture (OFA), Oracle Grid Infrastructure for a Standalone Server would be
installed as the Oracle software owner (oracle) and the Oracle home directory would be /u01/app/oracle/product/11.2.0/grid.
Best practice is to install Oracle Grid Infrastructure for a Standalone Server before installing the database. The registration of the database with Oracle Restart is automatic when it is created after Grid
Infrastructure is installed. In the case where the database is configured first and Grid later, the components would need to be manually added to the Oracle Restart configuration.

You must install Oracle Grid Infrastructure for a Standalone Server from the Oracle Grid
Infrastructure media. There is no separate download media for Oracle Grid Infrastructure for a
Standalone Server.

In this guide, Oracle ASM will be used as the file system and volume manager for Oracle Database files (data, online redo logs, control files, archived redo logs) and the Fast Recovery Area using two separate
disk groups; namely +TESTDB1_DATA and +FRA respectively.
An optional support library for the Oracle ASM feature named ASMLib will be configured to create two Oracle ASM volumes. Although optional, ASMLib is highly recommended as it allows a database using
Oracle ASM more efficient and capable access to the disk groups it is using. ASMLib was provided to enable Oracle ASM I/O to Linux disks without the limitations of the standard UNIX I/O API
Oracle Restart
Oracle Restart is another component of Oracle Grid Infrastructure for a Standalone Server that will be used in this guide.
Starting with Oracle Database 11g Release 2, the dbstart and dbshut scripts that were used to automate database startup and shutdown in previous Oracle versions are deprecated. Oracle now
recommends to configure Oracle Database with the Oracle Restart feature to automatically restart the database, the listener, Oracle Automatic Storage Management (Oracle ASM), and other Oracle
components after a hardware or software failure or when the database host computer restarts.

In Oracle Database 11g Release 2 (11.2), the Grid Infrastructure for a Standalone Server is
required in order to use Oracle ASM and Oracle Restart. If you want to use Oracle ASM or
Oracle Restart, then you must install Oracle Grid Infrastructure before you install and create
the database. Otherwise, you must manually register the database with Oracle Restart.

Oracle Restart can only manage 11.2 resources. Oracle Database releases prior to 11.2, however, can coexist on the same server but without being managed by Oracle Restart.
Oracle Restart improves the availability of an Oracle database by providing the following:
When there is a hardware or a software failure, Oracle Restart automatically starts all Oracle components, including the Oracle database instance, Oracle Net Listener, database services, and Oracle
ASM.
Oracle Restart starts components in the proper order when the database host is restarted.
Oracle Restart runs periodic checks to monitor the status of Oracle components. If a check operation fails for a component, then the component is shut down and restarted.
When using Oracle Restart, you can use Service Control Utility (SRVCTL), a command-line interface, to manage Oracle processes (database instance, listener, ASM instance). With SRVCTL, you can manage
the Oracle Restart configuration, see the status of processes managed by Oracle Restart, and start or stop processes such as the Oracle Database. SRVCTL has been enhanced to support single instance
databases with Oracle Restart on standalone servers and on clusters with Oracle Clusterware.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Oracle Restart is used in single-instance (non-clustered) environments only.


Separate Oracle Homes
It is a requirement that Oracle Grid Infrastructure for a Standalone Server and the Oracle Database software be installed in a separate Oracle home.
A separate Oracle home environment for Grid Infrastructure and the Oracle Database software will be created as described in the Oracle Configuration section to this guide.
Supported Platforms
Both 32-bit (x86) and 64-bit (x86_64) architectures are covered in this guide. Unless otherwise noted, the installation steps are the same for either. Having said that, one of the first decisions to make before
continuing with this guide is which architecture you will be using. Both Oracle and Linux must be installed on the same operating system architecture. For example, 32-bit Oracle is only supported to run on 32bit Linux OS and 64-bit Oracle is only supported to run on 64-bit Linux OS.

Oracle 64-bit (x86-64) for Linux is supported on AMD64/EM64T and Intel Processor Chips
that adhere to the x86-64 architecture with supported Linux releases. Running Oracle 32-bit
on AMD64/EM64T (64-bit OS) is not supported.
Oracle 32-bit (x86) running on AMD64/EM64T with a 32-bit OS is, however, supported.

Be sure to use only certified/supported combinations of Oracle Database version and OS


version for any type of mission critical system, which you can find under the Certifications
tab of My Oracle Support (MOS). The Certify information on MOS is the only official source
for Oracle certification.

Oracle Documentation
While this guide provides detailed instructions for successfully installing a complete Oracle Database 11g Release 2 system using Oracle ASM, it is by no means a substitute for the official Oracle
documentation (see list below). In addition to this guide, users should also consult the following Oracle documents to gain a full understanding of alternative configuration options, installation, and
administration with Oracle Database, Oracle Grid Infrastructure, Oracle ASM, and Oracle Restart. Oracle's official documentation site is docs.oracle.com.
Release Notes
11g Release 2 (11.2) for Linux
New Features Guide
11g Release 2 (11.2)
Universal Installer and OPatch User's Guide
11g Release 2 (11.2) for Windows and UNIX
Oracle Restart / Grid Infrastructure
11g Release 2 (11.2) for Linux
Database Installation Guide
11g Release 2 (11.2) for Linux
Database Quick Installation Guide
11g Release 2 (11.2) for Linux x86
Database Quick Installation Guide
11g Release 2 (11.2) for Linux x86-64
Database Administrator's Guide
11g Release 2 (11.2)
Database Concepts
11g Release 2 (11.2)
Automatic Storage Management Administrator's Guide 11g Release 2 (11.2)
Database Examples Installation Guide
11g Release 2 (11.2)

Goals for this Article


By the time you finish this article, the following will be installed and configured.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Two unformatted hard disks that will be marked as Oracle ASM disks using ASMLib. These two disks will be used to create two separate Oracle ASM disk groups for the database files and the recovery
files (Fast Recovery Area).
Oracle Database 11g Release 2 Grid Infrastructure (11.2) for a Standalone Server on a local file system (namely /u01/app/oracle/product/11.2.0/grid) separate from the Oracle Database
software. As part of the Oracle Grid Infrastructure installation, the Create ASM Disk Group wizard will be used to create an Oracle ASM instance named +ASM and an Oracle ASM disk group named
+TESTDB1_DATA for the Oracle database files.
A default Oracle Net Listener created by the Grid Infrastructure installation and running out of the Oracle home directory for Grid Infrastructure. This listener will be used by the Oracle ASM instance and
the example database created in this guide.
A separate Oracle ASM disk group for the Fast Recovery Area named +FRA and created using the Oracle Automatic Storage Management Configuration Assistant (Oracle ASMCA).
Oracle Database 11g Release 2 (11.2) software installed on a local file system (namely /u01/app/oracle/product/11.2.0/dbhome_1).
Oracle Database 11g Examples (formerly Companion).
An Oracle Restart enabled general-purpose database that makes use of Oracle ASM for physical database file storage (database files and the Fast Recovery Area).
Optional instructions are included to put the new database into Archive Log Mode.
Oracle Enterprise Manager Database Control running and can be accessed using a Web browser.
The following is a list of items NOT covered in this article:
Installing the Oracle Database software on a system that has an existing Oracle software installation. The installation in this article describes installing Oracle Database 11g Release 2 Grid Infrastructure
(11.2) for a Standalone Server and Oracle Database 11g Release 2 (11.2) software on a system with no previous Oracle installation.
Installing Oracle Grid Infrastructure for a Cluster and Oracle Real Application Clusters (RAC). For a complete discussion on installing Oracle RAC 11g Release 2 (11.2) and creating a clustered database,
see my article Building an Inexpensive Oracle RAC 11g R2 on Linux - (RHEL 5.5).
Enabling Enterprise Manager e-mail notifications or automated backups.

Example Configuration
This section describes the hardware and Oracle configuration parameters that will be used in this guide.
Hardware
The machine used for this guide will consist of an AMD Athlon 64 X2 Dual Core Processor 3800+ running Oracle Linux 5 (x86_64). The server has 4GB of memory and contains four (4) internal hard disks. Two
of the hard disks will be configured using Logical Volume Manager (LVM) while the two remaining disks will remain unformatted. One logical volume will be created for the Linux O/S while a second logical
volume will be created for the Oracle software (Oracle home directory for Grid Infrastructure and the Oracle Database software). The two unformatted hard disks will be marked as Oracle ASM disks and used for
database files and the Fast Recovery Area.
Oracle Server Configuration
Machine Name
testnode1.idevelopment.info

IP Address
192.168.1.106

Processor
1 x AMD Athlon 64 X2 Dual C ore Processor 3800+

Operation Environment

Memory

Oracle Linux 5.6 - (64-bit)

4GB

Physical Disks
Hard Drive

open in browser PRO version

Partition

Size - (MB)

Are you a developer? Try out the HTML to PDF API

Type

Usage

Mount Point

pdfcrowd.com

/dev/sda

/dev/sda1

101

ext3

Boot Volume

/dev/sda2
/dev/sdb

/boot

36,758

LVM Physical Volume

LVM

VolGroup00

/dev/sdb1

36,860

LVM Physical Volume

LVM

vg_orasoftware

/dev/sdc

/dev/sdc1

36,860

Unformatted

Oracle ASM Disk

/dev/sdd

/dev/sdd1

36,860

Unformatted

Oracle ASM Disk

Logical Volumes
LVM Volume Group

Logical Volume

VolGroup00

Size - (MB)

LogVol00

31,712

LogVol01

5,024

lv_orasoftware

vg_orasoftware

36,832

Type

Usage

ext3

Linux OS

swap

Swap

ext3

Oracle Database Software

Mount Point
/

/u01

Oracle ASM Volumes


ASM Disk Name

Device

Size - (MB)

Type

Usage

ASM Disk Group

ASM Redundancy

DATAVOL1

/dev/sdc1

32,768

ASMLib

Database Files

+TESTDB1_DATA

External

FRAVOL1

/dev/sdd1

32,768

ASMLib

Fast Recovery Area

+FRA

External

Oracle Configuration
The following is an introduction to some of the configuration parameters that will be used for installing the Oracle Grid Infrastructure and Oracle Database Software and creating a fully functional Oracle 11g
database configured to use Oracle ASM.
Oracle / Grid Software Owner
O/S User
oracle (501)

Primary Group
oinstall (501)

Supplementary Groups

Home Directory

dba (502), oper (503), asmadmin (504), asmdba (505), asmoper (506)

/home/oracle

Oracle Software Components


Software Component

Version

Grid Infrastructure for a Standalone Server

Oracle Database 11g Release 2 Grid Infrastructure (11.2.0.1.0) for Linux x86-64

Oracle Database

Oracle Database 11g Release 2 (11.2.0.1.0) for Linux x86-64

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Oracle Database Names


Software Component

Oracle SID

Global Database Name

Grid Infrastructure for a Standalone Server

+ASM

N/A

Oracle Database

testdb1

testdb1.idevelopment.info

Oracle Software Paths


Description

Directory

Oracle Base directory

/u01/app/oracle

Oracle Home directory for Oracle Grid Infrastructure

/u01/app/oracle/product/11.2.0/grid

Oracle Home directory for Oracle Database

/u01/app/oracle/product/11.2.0/dbhome_1

This guide adheres to the latest Optimal Flexible Architecture (OFA) standard for Oracle Database 11g Release 2 (11.2) for Linux.

Install the Linux Operating System


This section provides a summary of the steps used to install the Linux operating system. This guide is designed to work with Oracle Linux 5, CentOS 5, or Red Hat Enterprise Linux 5 and follows Oracle's
suggestion of performing a "default RPMs" installation type to ensure all expected Linux O/S packages are present for a successful Oracle Database installation.
Download Oracle Linux
Download Oracle Linux 5 from the Oracle Software Delivery Cloud (eDelivery) website.
64-bit (x86_64) Installations

Download the compressed binary DVD image V24479-01.zip for Oracle Linux Release 5 Update 6 (x86_64). Once downloaded, extract the binary DVD image from the archive which for this example is
named Enterprise-R5-U6-Server-x86_64-dvd.iso.
Oracle Linux Release 5 Update 6 for x86_64 (64 Bit) (3.5 GB)
32-bit (x86) Installations

Download the compressed binary DVD image V24478-01.zip for Oracle Linux Release 5 Update 6 (x86). Once downloaded, extract the binary DVD image from the archive which for this example is named
Enterprise-R5-U6-Server-i386-dvd.iso.
Oracle Linux Release 5 Update 6 for x86 (32 Bit) (2.9 GB)
Burn Binary Image to DVD
If you are downloading the above ISO files to a MS Windows machine, there are many options for burning these images (ISO files) to a DVD. You may already be familiar with and have the proper software to
burn images to DVD. If you are not familiar with this process and do not have the required software to burn images to DVD, here are just three of the many software packages that can be used.
InfraRecorder
UltraISO

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Magic ISO Maker


Install Oracle Linux
After downloading and burning the Oracle Linux image (ISO file) to a DVD, insert Disk #1 into the server, power it on, and answer the installation screen prompts as noted below.
Oracle Linux Installation
Screen Name

Response

Boot Screen

The first screen is the Oracle Linux boot screen. At the boot: prompt, hit [Enter] to start the
installation process.

Media Test

When asked to test the C D media, tab over to [Skip] and hit [Enter]. If there were any errors,
the media burning software would have warned us. After several seconds, the installer should
then detect the video card, monitor, and mouse. The installer then goes into GUI mode.

Welcome to Oracle Linux

At the welcome screen, click [Next] to continue.

Language Selection

Select the appropriate language for your configuration and click [Next] to continue.

Keyboard Selection

Select the appropriate keyboard for your configuration and click [Next] to continue.

Storage Device Warning

The installer will display a warning dialog for every installed disk device it detects indicating
that the storage device may contain important data and that the device must be initialized in
order to create new partitions. C lick [Yes] to acknowledge this warning for each disk device the
installer detects.

Screen Shot

Select "Remove all partitions on selected drives and create default layout".
If the machine is configured with multiple storage devices, select which device (or devices) to
include as the system drive(s). Any selected devices will be used as system drives and will be
formatted by the installer and included as the target for the OS install.
Select System
Drive(s)

In this guide, only one of the devices will be used for the system drive (sda).
Finally, check the option to "Review and modify partitioning layout" and click [Next] to
continue.
You will then be prompted with a dialog window asking if you really want to remove all
partitions (ALL_DATA) on the selected drives. C lick [Yes] to acknowledge this warning.
The installer will present a default partitioning scheme for the current disk sizes. Modify any
volumes as required. The settings you make here will, of course, depend on your storage
configuration.
Given the example presented in this guide, I only configured two of the four hard disks using
the Disk Partitioning Layout wizard.
1. The /boot file system and an LVM Volume Group named VolGroup00 will be created on
the first hard disk (/dev/sda) and will be used for the Linux operating environment and

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

swap.
2. A new LVM Volume Group (vg_orasoftware) and Logical Volume (lv_orasoftware)
will be created on /dev/sdb. This logical volume will be formatted as ext3 and used for
the /u01 mount point to store the Oracle Grid Infrastructure and Oracle Database
software.

Disk Partitioning Layout

3. The remaining two hard disks (/dev/sdc and /dev/sdd) will be not be configured using
the Disk Partitioning Layout wizard and should remain unformatted. These two hard
disks will be configured later in this guide and marked as Oracle ASM disks for use with
Oracle ASM.
C lick here for a preview of the disk configuration used for this guide.
Ensure enough swap space is allocated as required by Oracle (which is a multiple of the
available RAM). The following is Oracle's minimum requirement for swap space:
Available RAM

Swap Space Required

Between 1 GB and 2 GB

1.5 times the size of RAM

Between 2 GB and 16 GB

Equal to the size of RAM

More than 16 GB

16 GB

Once you are satisfied with the disk layout, click [Next] to continue.
Boot Loader Configuration

The installer will use the GRUB boot loader by default. To use the "GRUB boot loader", accept
all default values and click [Next] to continue.
The installer should have successfully detected any installed network devices. It is not
recommended to configure the public interface on an Oracle Database server (eth0 in this
example) to use DHC P so this guide will use the traditional method of manually assigning a
static IP address. The settings you make here will, of course, depend on your network
configuration.
First, make sure that the public network device is checked to "Active on boot".
Second, [Edit] the public network interface (eth0) accordingly.
eth0

Network Configuration

Enable IPv4 support

ON

Dynamic IP configuration (DHC P) - (select Manual configuration)

OFF

IPv4 Address

192.168.1.106

Prefix (Netmask)

255.255.255.0

Enable IPv6 support

OFF

C ontinue by manually setting the hostname and supplying your gateway and DNS servers.
C lick [Next] to continue

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Time Zone

Select the appropriate time zone for your environment and click [Next] to continue.

Set Root Password

Select a root password and click [Next] to continue.

Installation Type

By default, Oracle Linux installs most of the software required for a typical server. There are
several other packages (RPMs), however, that are required to successfully install the Oracle
software. The installer includes a "C ustomize software" selection that allows the addition of
RPM groupings such as "Development Libraries" or "Legacy Library Support". The addition of
such RPM groupings is not an issue. De-selecting any "default RPM" groupings or individual
RPMs, however, can result in failed Oracle Grid Infrastructure and Oracle Database installation
attempts.
For the purpose of this guide, select the radio button "C ustomize now" and click [Next] to
continue.
This is where you pick the packages to install. Most of the packages required for the Oracle
software are grouped into "Package Groups" (i.e. Application -> Editors). Since this machine
will be hosting the Oracle Grid Infrastructure and Oracle Database software, verify that at least
the following package groups are selected for the install. For many of the Linux package
groups, not all of the packages associated with that group get selected for installation. (Note
the "Optional packages" button after selecting a package group.) So although the package
group gets selected for install, some of the packages required by Oracle do not get installed. In
fact, there are some packages that are required by Oracle that do not belong to any of the
available package groups (i.e. libaio-devel). Not to worry. A complete list of required
packages for Oracle Grid Infrastructure 11g Release 2 and Oracle Database 11g Release 2 for
Linux will be provided in the next section. These packages will need to be manually installed
from the Oracle Linux DVDs after the operating system install. For now, install the following
package groups.
Desktop Environments
GNOME Desktop Environment
Applications

Package Group Selection

Editors
Graphical Internet
Text-based Internet
Development
Development Libraries
Development Tools
Legacy Software Development
Servers
Server C onfiguration Tools
Base System
Administration Tools
Base
Java
Legacy Software Support

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

System Tools
X Window System
In addition to the above packages, select any additional packages you wish to install for this
node keeping in mind to NOT de-select any of the "default" RPM packages. After selecting the
packages to install click [Next] to continue.

About to Install

This screen is basically a confirmation screen. C lick [Next] to start the installation. If you are
installing Oracle Linux using C Ds, you will be asked to switch C Ds during the installation
process depending on which packages you selected.

Installation Process

The Oracle Linux install process will start. Wait for the installation to complete.

Reboot System

After all of the packages and bootloader have been installed, the installer will eject the DVD
from the drive. Take out the DVD and click [Reboot] to reboot the system and complete the
installation.

Post Installation Wizard


Welcome Screen

When the system boots into Oracle Linux for the first time, it will prompt you with another
welcome screen for the "Post Installation Wizard". The post installation wizard allows you to
make final OS configuration settings. On the "Welcome screen", click [Forward] to continue.

License Agreement

Accept the license agreement and click [Forward] to continue.


On the Firewall screen, make sure to select the "Disabled" option and click [Forward] to
continue.

Firewall
You will be prompted with a warning dialog about not setting the firewall. When this occurs,
click [Yes] to continue.
On the SELinux screen, choose the "Disabled" option and click [Forward] to continue.
SELinux

You will be prompted with a warning dialog warning that changing the SELinux setting will
require rebooting the system so the entire file system can be relabeled. When this occurs, click
[Yes] to acknowledge a reboot of the system will occur after firstboot (Post Installation Wizard)
is completed.

Kdump

Accept the default setting on the Kdump screen and click [Forward] to continue.

Date and Time

Adjust the date and time settings if necessary and click [Forward] to continue.
C reate any additional (non-oracle) operating system user accounts if desired and click
[Forward] to continue.

Create User
If you chose not to define any additional operating system user accounts, click [Yes] to
acknowledge the warning dialog.
Sound Card

On the sound card screen, click [Forward] to continue.

Additional CDs

On the "Additional C Ds" screen click [Finish] to continue.

Reboot System

Enabling Kdump requires the machine to be rebooted in order to reallocate memory


accordingly. C lick [Yes] on the warning dialog to reboot the system.

Login Screen

After the machine boots, you are presented with the Oracle Linux login screen.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

User Desktop

After successfully logging in to the system, you are ready to start using the desktop.

Install Required Linux Packages for Oracle


After installing the Linux OS, the next step is to verify and install all packages required for Oracle Grid Infrastructure and Oracle Database. The Oracle Universal Installer (OUI) performs checks on the machine
during installation to verify that it meets the appropriate operating system package requirements. To ensure that these checks complete successfully, verify the software requirements documented in this section
before starting the Oracle install.
Although many of the required packages for Oracle were installed during the Linux installation, several will be missing either because they were considered optional within the package group or simply didn't
exist in any package group.
The packages listed in this section (or later versions) are required for Oracle Grid Infrastructure 11g Release 2 and Oracle Database 11g Release 2 running on the Red Hat Enterprise Linux 5, Oracle Linux 5, or
CentOS 5 platform.
While it is possible to query each individual package to determine which ones are missing and need to be installed, an easier method is to run the rpm -Uvh PackageName command from the DVD. For
packages that already exist and are up to date, the RPM command will simply ignore the install and print a warning message to the console that the package is already installed.
64-bit (x86_64) Installations
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libstdc++-4.1.2
libstdc++-4.1.2 (32 bit)
libstdc++-devel 4.1.2
libstdc++-devel 4.1.2 (32 bit)
make-3.81
pdksh-5.2.14
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)
Each of the packages listed above can be found on the Oracle Linux 5 for x86_64 DVDs.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Starting with Oracle Database 11g Release 2 (11.2.0.2), all the 32-bit packages, except for
gcc-32bit-4.3 (SUSE Linux Enterprise Server 11), listed in this section are no longer
required for installing a database on Linux x86-64. Only the 64-bit packages are required.
For any Oracle Database 11g release before 11.2.0.2, however, both the 32-bit and 64-bit
packages listed in this section are required.
The installation described in this guide will install the 32-bit packages. Although many of
these packages are unnecessary for 11.2.0.2 onwards on Linux x86-64, having them present
will not cause a problem.

# From Oracle Linux 5.6 (x86_64) - [DVD #1]


mkdir -p /media/dvd
mount -r /dev/dvd /media/dvd
cd /media/dvd/Server
rpm -Uvh binutils-2*x86_64*
rpm -Uvh compat-libstdc++-33*x86_64*
rpm -Uvh compat-libstdc++-33*i386*
rpm -Uvh elfutils-libelf-0*x86_64*
rpm -Uvh elfutils-libelf-devel-0*x86_64*
rpm -Uvh elfutils-libelf-devel-static-0*x86_64*
rpm -Uvh gcc-4*x86_64*
rpm -Uvh gcc-c++-4*x86_64*
rpm -Uvh glibc-2*x86_64*
rpm -Uvh glibc-2*i686*
rpm -Uvh glibc-common-2*x86_64*
rpm -Uvh glibc-devel-2*x86_64*
rpm -Uvh glibc-devel-2*i386*
rpm -Uvh glibc-headers-2*x86_64*
rpm -Uvh ksh-*x86_64*
rpm -Uvh libaio-0*x86_64*
rpm -Uvh libaio-0*i386*
rpm -Uvh libaio-devel-0*x86_64*
rpm -Uvh libaio-devel-0*i386*
rpm -Uvh libgcc-4*x86_64*
rpm -Uvh libgcc-4*i386*
rpm -Uvh libstdc++-4*x86_64*
rpm -Uvh libstdc++-4*i386*
rpm -Uvh libstdc++-devel-4*x86_64*
rpm -Uvh libstdc++-devel-4*i386*
rpm -Uvh make-3*x86_64*
rpm -Uvh pdksh-5*x86_64*
rpm -Uvh sysstat-7*x86_64*
rpm -Uvh unixODBC-2*x86_64*
rpm -Uvh unixODBC-2*i386*
rpm -Uvh unixODBC-devel-2*x86_64*
rpm -Uvh unixODBC-devel-2*i386*
cd /
eject

32-bit (x86) Installations

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.52
glibc-headers-2.5
kernel-headers-2.6.18
ksh-20060214
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libgomp-4.1.2
libstdc++-4.1.2
libstdc++-devel-4.1.2
make-3.81
pdksh-5.2.14
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-devel-2.2.11
Each of the packages listed above can be found on the Oracle Linux 5 for x86 DVDs.

# From Oracle Linux 5.6 (x86) - [DVD #1]


mkdir -p /media/dvd
mount -r /dev/dvd /media/dvd
cd /media/dvd/Server
rpm -Uvh binutils-2*i386*
rpm -Uvh compat-libstdc++-33*i386*
rpm -Uvh elfutils-libelf-0*i386*
rpm -Uvh elfutils-libelf-devel-0*i386*
rpm -Uvh elfutils-libelf-devel-static-0*i386*
rpm -Uvh gcc-4*i386*
rpm -Uvh gcc-c++-4*i386*
rpm -Uvh glibc-2*i686*
rpm -Uvh glibc-common-2*i386*
rpm -Uvh glibc-devel-2*i386*
rpm -Uvh glibc-headers-2*i386*
rpm -Uvh kernel-headers-2*i386*
rpm -Uvh ksh-*i386*
rpm -Uvh libaio-0*i386*
rpm -Uvh libaio-devel-0*i386*
rpm -Uvh libgcc-4*i386*
rpm -Uvh libgomp-4*i386*
rpm -Uvh libstdc++-4*i386*
rpm -Uvh libstdc++-devel-4*i386*
rpm -Uvh make-3*i386*
rpm -Uvh pdksh-5*i386*
rpm -Uvh sysstat-7*i386*
rpm -Uvh unixODBC-2*i386*
rpm -Uvh unixODBC-devel-2*i386*

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

cd /
eject

Create oracle User and Directories


This section provides instructions on how to create the operating system user and groups that will be used to install and manage the Oracle Grid Infrastructure and Oracle Database software. In addition to the
Oracle software owner, another OS user (jhunter) will be configured with the appropriate DBA related OS groups to manage the Oracle database and Oracle ASM instance for Grid Infrastructure.
The following OS groups will be created.
Description

Oracle Privilege

Oracle Group Name

oracle, jhunter

SYSDBA

OSDBA

503

oracle, jhunter

SYSOPER

OSOPER

asmadmin

504

oracle

SYSASM

OSASM

ASM Database Administrator Group

asmdba

505

oracle, jhunter

SYSDBA for ASM

OSDBA for ASM

ASM Operator Group

asmoper

506

oracle, jhunter

SYSOPER for ASM

OSOPER for ASM

Oracle Inventory and Software Owner


Database Administrator
Database Operator
Oracle Automatic Storage Management Group

OS Group Name

OS Group ID

OS Users Assigned to this Group

oinstall

501

oracle

dba

502

oper

OS Group Descriptions
Oracle Inventory Group (typically oinstall)
This group must be created the first time you install Oracle software on the system. Members of the OINSTALL group are considered the "owners" of the Oracle software and are granted privileges to
write to the Oracle central inventory (oraInventory). When you install Oracle software on a Linux system for the first time, OUI creates the /etc/oraInst.loc file. This file identifies the name of the
Oracle Inventory group (by default, oinstall), and the path of the Oracle Central Inventory directory.
Ensure that this group is available as a primary group for all planned Oracle software installation owners. For the purpose of this guide, the oracle installation owner will be configured with oinstall as
its primary group.
Database Administrator (OSDBA, typically dba)
Members of the OSDBA group can use SQL to connect to an Oracle instance as SYSDBA using operating system authentication. Members of this group can perform critical database administration tasks,
such as creating the database and instance startup and shutdown. The default name for this group is dba. The SYSDBA system privilege allows access to a database instance even when the database is
not open. Control of this privilege is totally outside of the database itself.
The oracle installation owner should be a member of the OSDBA group (configured as a secondary group) along with any other DBA user accounts (i.e. jhunter) needing access to an Oracle instance
as SYSDBA using operating system authentication.
The SYSDBA system privilege should not be confused with the database role DBA. The DBA role does not include the SYSDBA or SYSOPER system privileges.
Database Operator (OSOPER, typically oper)
Members of the OSOPER group can use SQL to connect to an Oracle instance as SYSOPER using operating system authentication. Members of this optional group have a limited set of database
administrative privileges such as managing and running backups. The default name for this group is oper. The SYSOPER system privilege allows access to a database instance even when the database
is not open. Control of this privilege is totally outside of the database itself. To use this group, choose the Advanced installation type to install the Oracle database software.
The Oracle Automatic Storage Management Group (typically asmadmin)

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Create this group as a separate group if you want to have separate administration privilege groups for Oracle ASM and Oracle Database administrators. In Oracle documentation, the operating system
group whose members are granted privileges is called the OSASM group, and in code examples, where there is a group specifically created to grant this privilege, it is referred to as asmadmin.
Members of the OSASM group can use SQL to connect to an Oracle ASM instance as SYSASM using operating system authentication. The SYSASM privilege that was introduced in Oracle ASM 11g
Release 1 (11.1) is now fully separated from the SYSDBA privilege in Oracle ASM 11g Release 2 (11.2). SYSASM privileges no longer provide access privileges on an RDBMS instance. Providing system
privileges for the storage tier using the SYSASM privilege instead of the SYSDBA privilege provides a clearer division of responsibility between ASM administration and database administration, and helps to
prevent different databases using the same storage from accidentally overwriting each others files. The SYSASM privileges permit mounting and dismounting disk groups, and other storage administration
tasks.
The ASM Database Administrator group (OSDBA for ASM, typically asmdba)
Members of the ASM Database Administrator group (OSDBA for ASM) is a subset of the SYSASM privileges and are granted read and write access to files managed by Oracle ASM. When using ASM, all
Oracle Database software owners (i.e. oracle) must be a member of this group, and all users with OSDBA membership on databases that have access to the files managed by Oracle ASM must be
members of the OSDBA group for ASM.
Members of the ASM Operator Group (OSOPER for ASM, typically asmoper)
This is an optional group. Create this group if you want a separate group of operating system users to have a limited set of Oracle ASM instance administrative privileges (the SYSOPER for ASM
privilege), including starting up and stopping the Oracle ASM instance. By default, members of the OSASM group also have all privileges granted by the SYSOPER for ASM privilege.
To use the ASM Operator group to create an ASM administrator group with fewer privileges than the default asmadmin group, you must choose the Advanced installation type to install the Oracle
Database software. In this case, OUI prompts you to specify the name of this group. In this guide, this group is asmoper.
If you want to have an OSOPER for ASM group, then the Oracle software owner (oracle) must be a member of this group.
Create Groups and User for Oracle Database Software
Create the recommended OS groups and user for the Oracle Database software owner.

[root@testnode1
[root@testnode1
[root@testnode1
[root@testnode1
[root@testnode1
[root@testnode1
[root@testnode1

~]#
~]#
~]#
~]#
~]#
~]#
~]#

groupadd -g 501 oinstall


groupadd -g 502 dba
groupadd -g 503 oper
groupadd -g 504 asmadmin
groupadd -g 505 asmdba
groupadd -g 506 asmoper
useradd -m -u 501 -g oinstall -G dba,oper,asmadmin,asmdba,asmoper -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle

[root@testnode1 ~]# id oracle


uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),504(asmadmin),505(asmdba),506(asmoper)
Create a new password for the oracle account.

[root@testnode1 ~]# passwd oracle


Changing password for user oracle.
New password: xxxxxxxxxxx
Retype new password: xxxxxxxxxxx
passwd: all authentication tokens updated successfully.
Optionally, configure any other OS users with the appropriate DBA related OS groups to manage the Oracle database and Oracle ASM instance for Grid Infrastructure. Remember to use the append option (-a)
to the usermod command so that the user will not be removed from groups not listed.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

[root@testnode1 ~]# usermod -a -G dba,oper,asmdba,asmoper jhunter


[root@testnode1 ~]# id jhunter
uid=500(jhunter) gid=500(jhunter) groups=500(jhunter),502(dba),503(oper),505(asmdba),506(asmoper)

Create Login Script for the oracle User Account


Log in to machine as the oracle user account and create the following login script (.bash_profile). Values marked in red should be customized for your environment.

[root@testnode1 ~]# su - oracle

#
#
#
#
#
#
#
#
#

--------------------------------------------------.bash_profile
--------------------------------------------------OS User:
oracle
Application: Oracle Database Software Owner
Oracle Grid Infrastructure for a
Standalone Server
Version:
Oracle 11g Release 2
---------------------------------------------------

# Get the aliases and functions


if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
alias ls="ls -FA"
# --------------------------------------------------# ORACLE_SID
# --------------------------------------------------# Specifies the Oracle system identifier (SID) for
# the Oracle instance running on this node. When
# using RAC, each node must have a unique ORACLE_SID.
# (i.e. racdb1, racdb2,...)
# --------------------------------------------------ORACLE_SID=testdb1; export ORACLE_SID
# --------------------------------------------------# ORACLE_UNQNAME and ORACLE_HOSTNAME
# --------------------------------------------------# In previous releases of Oracle Database, you were
# required to set environment variables for
# ORACLE_HOME and ORACLE_SID to start, stop, and
# check the status of Enterprise Manager. With
# Oracle Database 11g Release 2 (11.2) and later, you
# need to set the environment variables ORACLE_HOME,
# ORACLE_UNQNAME, and ORACLE_HOSTNAME to use
# Enterprise Manager. Set ORACLE_UNQNAME equal to
# the database unique name and ORACLE_HOSTNAME to
# the hostname of the machine.
# --------------------------------------------------ORACLE_UNQNAME=testdb1; export ORACLE_UNQNAME

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

ORACLE_HOSTNAME=testnode1.idevelopment.info; export ORACLE_HOSTNAME


# --------------------------------------------------# JAVA_HOME
# --------------------------------------------------# Specifies the directory of the Java SDK and Runtime
# Environment.
# --------------------------------------------------JAVA_HOME=/usr/local/java; export JAVA_HOME
# --------------------------------------------------# ORACLE_BASE
# --------------------------------------------------# Specifies the base of the Oracle directory structure
# for Optimal Flexible Architecture (OFA) compliant
# database software installations.
# --------------------------------------------------ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
# --------------------------------------------------# ORACLE_HOME
# --------------------------------------------------# Specifies the directory containing the Oracle
# Database software.
# --------------------------------------------------ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
# --------------------------------------------------# GRID_HOME
# --------------------------------------------------# Specifies the directory containing the
# Oracle Grid Infrastructure for a Standalone Server.
# --------------------------------------------------GRID_HOME=$ORACLE_BASE/product/11.2.0/grid; export GRID_HOME
# --------------------------------------------------# ORACLE_PATH
# --------------------------------------------------# Specifies the search path for files used by Oracle
# applications such as SQL*Plus. If the full path to
# the file is not specified, or if the file is not
# in the current directory, the Oracle application
# uses ORACLE_PATH to locate the file.
# This variable is used by SQL*Plus, Forms and Menu.
# --------------------------------------------------ORACLE_PATH=/u01/app/oracle/dba_scripts/sql:$ORACLE_HOME/rdbms/admin; export ORACLE_PATH
#
#
#
#
#
#
#

--------------------------------------------------SQLPATH
--------------------------------------------------Specifies the directory or list of directories that
SQL*Plus searches for a login.sql file.
--------------------------------------------------SQLPATH=/u01/app/oracle/dba_scripts/sql; export SQLPATH

# --------------------------------------------------# ORACLE_TERM

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

# --------------------------------------------------# Defines a terminal definition. If not set, it


# defaults to the value of your TERM environment
# variable. Used by all character mode products.
# --------------------------------------------------ORACLE_TERM=xterm; export ORACLE_TERM
# --------------------------------------------------# NLS_DATE_FORMAT
# --------------------------------------------------# Specifies the default date format to use with the
# TO_CHAR and TO_DATE functions. The default value of
# this parameter is determined by NLS_TERRITORY. The
# value of this parameter can be any valid date
# format mask, and the value must be surrounded by
# double quotation marks. For example:
#
#
NLS_DATE_FORMAT = "MM/DD/YYYY"
#
# --------------------------------------------------NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT
# --------------------------------------------------# TNS_ADMIN
# --------------------------------------------------# Specifies the directory containing the Oracle Net
# Services configuration files like listener.ora,
# tnsnames.ora, and sqlnet.ora. When using Oracle
# ASM, the TNS listener will be run out of
# GRID_HOME; otherwise the listener will be run out
# ORACLE_HOME.
# --------------------------------------------------# TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
TNS_ADMIN=$GRID_HOME/network/admin; export TNS_ADMIN
# --------------------------------------------------# ORA_NLS11
# --------------------------------------------------# Specifies the directory where the language,
# territory, character set, and linguistic definition
# files are stored.
# --------------------------------------------------ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
# --------------------------------------------------# PATH
# --------------------------------------------------# Used by the shell to locate executable programs;
# must include the $ORACLE_HOME/bin directory.
# --------------------------------------------------PATH=.:${JAVA_HOME}/bin:$JAVA_HOME/db/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/oracle/dba_scripts/bin
export PATH
# --------------------------------------------------# LD_LIBRARY_PATH

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

# --------------------------------------------------# Specifies the list of directories that the shared


# library loader searches to locate shared object
# libraries at runtime.
# --------------------------------------------------LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
# --------------------------------------------------# CLASSPATH
# --------------------------------------------------# The class path is the path that the Java runtime
# environment searches for classes and other resource
# files. The class search path (more commonly known
# by the shorter name, "class path") can be set using
# either the -classpath option when calling a JDK
# tool (the preferred method) or by setting the
# CLASSPATH environment variable. The -classpath
# option is preferred because you can set it
# individually for each application without affecting
# other applications and without other applications
# modifying its value.
# --------------------------------------------------CLASSPATH=.:$ORACLE_HOME/jdbc/lib/ojdbc6.jar
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
# --------------------------------------------------# THREADS_FLAG
# --------------------------------------------------# All the tools in the JDK use green threads as a
# default. To specify that native threads should be
# used, set the THREADS_FLAG environment variable to
# "native". You can revert to the use of green
# threads by setting THREADS_FLAG to the value
# "green".
# --------------------------------------------------THREADS_FLAG=native; export THREADS_FLAG
# --------------------------------------------------# TEMP, TMP, and TMPDIR
# --------------------------------------------------# Specify the default directories for temporary
# files; if set, tools that create temporary files
# create them in one of these directories.
# --------------------------------------------------export TEMP=/tmp
export TMPDIR=/tmp
#
#
#
#
#

--------------------------------------------------UMASK
--------------------------------------------------Set the default file mode creation mask
(umask) to 022 to ensure that the user performing

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

# the Oracle software installation creates files


# with 644 permissions.
# --------------------------------------------------umask 022

Verify That the User nobody Exists


Before installing the software, complete the following procedure to verify that the user nobody exists on the system.
1. To determine if the user exists, enter the following command.

[root@testnode1 ~]# id nobody


uid=99(nobody) gid=99(nobody) groups=99(nobody)
If this command displays information about the nobody user, then you do not have to create that user.
2. If the user nobody does not exist, then enter the following command to create it.

[root@testnode1 ~]# /usr/sbin/useradd nobody

Create the Oracle Base Directory Path


The next step is to configure an Oracle base path compliant with an Optimal Flexible Architecture (OFA) structure and correct permissions. The Oracle base path will be used to store the Oracle Database
software.

[root@testnode1 ~]# mkdir -p /u01/app/oracle


[root@testnode1 ~]# chown -R oracle:oinstall /u01/app
[root@testnode1 ~]# chmod -R 775 /u01/app
At the end of this section, you should have the following user, groups, and directory path configuration.
An Oracle central inventory group, or oraInventory group (oinstall), whose members include oracle. Members of this group have the central inventory group as their primary group and are granted
permissions to write to the oraInventory directory.
A separate OSDBA group (dba), whose members include oracle, and who are granted the SYSDBA privilege to administer the Oracle Database.
A separate OSOPER group (oper), whose members include oracle, and who are granted limited Oracle database administrator privileges.
A separate OSASM group (asmadmin), whose members include oracle, and who are granted the SYSASM privilege to administer Oracle Grid Infrastructure and Oracle ASM.
A separate OSDBA for ASM group (asmdba), whose members include oracle, and who are granted access to Oracle ASM.
A separate OSOPER for ASM group (asmoper), whose members include oracle, and who are granted limited Oracle ASM administrator privileges, including the permissions to start and stop the
Oracle ASM instance.
An Oracle Database software owner (oracle), with the oraInventory group as its primary group, and with the OSDBA (dba), OSOPER (oper), OSASM (asmadmin), OSDBA for ASM (asmdba), and
OSOPER for ASM (asmoper) group as its secondary group.
OFA-compliant mount point /u01 that will be used for the Oracle software installation.
During installation, OUI creates the Oracle Inventory directory in the path /u01/app/oraInventory. This path remains owned by oracle:oinstall, to enable other Oracle software owners to write

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

to the central inventory.


An Oracle base /u01/app/oracle owned by oracle:oinstall with 775 permissions.
Set Resource Limits for the Oracle Software Installation Users
To improve the performance of the software on Linux systems, you must increase the following resource limits for the Oracle software owner (oracle).
Resource Shell Limit

Item in limits.conf

Soft Limit

Hard Limit

Open file descriptors

nofile

at least 1024

at least 65536

Number of processes available to a single user

nproc

at least 2047

at least 16384

Size of the stack segment of the process

stack

at least 10240 KB

at least 10240 KB, and at most 32768 KB

Use the following to check resource limits.


1. Log in as an Oracle installation owner.
2. Check the soft and hard limits for the file descriptor setting. Ensure that the result is in the recommended range. For example:

[oracle@testnode1 ~]$ ulimit -Sn


1024
[oracle@testnode1 ~]$ ulimit -Hn
1024
3. Check the soft and hard limits for the number of processes available to a user. Ensure that the result is in the recommended range. For example:

[oracle@testnode1 ~]$ ulimit -Su


81920
[oracle@testnode1 ~]$ ulimit -Hu
81920
4. Check the soft limit for the stack setting. Ensure that the result is in the recommended range. For example:

[oracle@testnode1 ~]$ ulimit -Ss


10240
[oracle@testnode1 ~]$ ulimit -Hs
unlimited
5. If necessary, update the resource limits in the /etc/security/limits.conf configuration file for the Oracle installation owner by adding the following lines.

oracle
oracle
oracle

soft
hard
soft

open in browser PRO version

nproc
nproc
nofile

2047
16384
1024

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

oracle
oracle

hard
soft

nofile
stack

65536
10240

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

session

required

pam_limits.so

Depending on your shell environment, make the following changes to the default shell startup file in order to change ulimit settings for the Oracle installation owner.
For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file.

if [ $USER = "oracle" ]; then


if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
For the C shell (csh or tcsh), add the following lines to the /etc/csh.login file.

if ( $USER == "oracle" ) then


limit maxproc 16384
limit descriptors 65536
endif

Configure the Linux Operating System for Oracle


This section focuses on preparing the Linux operating system for the Oracle Grid Infrastructure 11g Release 2 and Oracle Database 11g Release 2 installation. This includes verifying enough memory and swap
space, setting shared memory and semaphores, setting the maximum number of file handles, setting the IP local port range, and how to activate all kernel parameters for the system.
The kernel parameters discussed in this section will need to persist through machine reboots. Although there are several methods used to set these parameters, I will be making all changes permanent through
reboots by placing all values in the /etc/sysctl.conf file. Instructions for setting all OS kernel parameters required by Oracle in a startup script will be discussed later in this section.
Kernel Parameters
The kernel parameters presented in this section are only recommended values as documented by Oracle. For production database systems, Oracle recommends that you tune these values to optimize the
performance of the system.
Verify that the kernel parameters described in this section are set to values greater than or equal to the recommended values. Also note that when setting the four semaphore values that all four values need to
be entered on one line.
Oracle Database 11g Release 2 for Linux requires the kernel parameter settings shown below. The values given are minimums, so if your system uses a larger value, do not change it.

kernel.shmmax = 4294967295
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

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 = 1048576
fs.file-max = 6815744
fs.aio-max-nr = 1048576

RHEL/OL/CentOS 5 already comes configured with default values defined for the following
kernel parameters.
kernel.shmmax
kernel.shmall
The default values for these two kernel parameters should be overwritten with the
recommended values defined in this guide.

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

# +---------------------------------------------------------+
# | KERNEL PARAMETERS FOR ORACLE DATABASE 11g R2 ON LINUX
|
# +---------------------------------------------------------+
# +---------------------------------------------------------+
# | SHARED MEMORY
|
# +---------------------------------------------------------+
# Maximum size (in bytes) for a shared memory segment
kernel.shmmax = 4294967295
# Maximum amount of shared memory (in pages) that
# can be used at one time on the system and should be at
# least ceil(SHMMAX/PAGE_SIZE)
kernel.shmall = 2097152
# Maximum number of shared memory segments system wide
kernel.shmmni = 4096
# +---------------------------------------------------------+
# | SEMAPHORES
|
# +---------------------------------------------------------+
# SEMMSL_value SEMMNS_value SEMOPM_value
kernel.sem = 250 32000 100 128

SEMMNI_value

# +---------------------------------------------------------+
# | NETWORKING
|
# ----------------------------------------------------------+
# Defines the local port range that is used by TCP and UDP
# traffic to choose the local port
net.ipv4.ip_local_port_range = 9000 65500

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

# Default setting in bytes of the socket "receive" buffer which


# may be set by using the SO_RCVBUF socket option
net.core.rmem_default = 262144
# Maximum setting in bytes of the socket "receive" buffer which
# may be set by using the SO_RCVBUF socket option
net.core.rmem_max = 4194304
# Default setting in bytes of the socket "send" buffer which
# may be set by using the SO_SNDBUF socket option
net.core.wmem_default = 262144
# Maximum setting in bytes of the socket "send" buffer which
# may be set by using the SO_SNDBUF socket option
net.core.wmem_max = 1048576
# +---------------------------------------------------------+
# | FILE HANDLES
|
# ----------------------------------------------------------+
# Maximum number of file-handles that the Linux kernel will allocate
fs.file-max = 6815744
# Maximum number of allowable concurrent asynchronous I/O requests requests
fs.aio-max-nr = 1048576
Placing the kernel parameters in the /etc/sysctl.conf startup file persists the required kernel parameters through reboots. Linux allows modification of these kernel parameters to the current system while
it is up and running, so there's no need to reboot the system after making kernel parameter changes. To activate the new kernel parameter values for the currently running system, run the following as root.

[root@testnode1 ~]# sysctl -p


net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 2
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.shmmax = 4294967295
kernel.shmall = 2097152
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 = 1048576
fs.file-max = 6815744
fs.aio-max-nr = 1048576
Verify the new kernel parameter values by running the following.

[root@testnode1 ~]# /sbin/sysctl -a | grep shm | sort


kernel.shmall = 2097152

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

kernel.shmmax = 4294967295
kernel.shmmni = 4096
vm.hugetlb_shm_group = 0
[root@testnode1 ~]# /sbin/sysctl -a | grep sem
kernel.sem = 250
32000
100
128
[root@testnode1 ~]# /sbin/sysctl -a | grep ip_local_port_range
net.ipv4.ip_local_port_range = 9000
65500
[root@testnode1 ~]# /sbin/sysctl -a | grep 'core\.[rw]mem' | sort
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
[root@testnode1 ~]# /sbin/sysctl -a | egrep 'file-max|aio-max' | sort
fs.aio-max-nr = 1048576
fs.file-max = 6815744

Memory
The minimum required RAM for Oracle Database 11g Release 2 running on the Linux platform is 1 GB (although 2 GB or more of RAM is highly recommended). In addition to the Oracle Database, Oracle Grid
Infrastructure for a Standalone Server requires a minimum of 1.5 GB of RAM. Oracle recommends 4 GB or more when planning to install both Oracle Grid Infrastructure for a Standalone Server and Oracle
Database on the same machine which is the configuration described in this guide.
Use the following command to check the amount of installed RAM on the system.

[root@testnode1 ~]# cat /proc/meminfo | grep MemTotal


MemTotal:
4147592 kB
If the size of the installed RAM is less than the required size, then you must install more memory before continuing.
Swap Space
The following table describes the relationship between installed RAM and the configured swap space recommendation.
Available RAM

Swap Space Required

Between 1 GB and 2 GB

1.5 times the size of RAM

Between 2 GB and 16 GB

Equal to the size of RAM

More than 16 GB

16 GB

Use the following command to determine the size of the configured swap space.

[root@testnode1 ~]# grep SwapTotal /proc/meminfo


SwapTotal:
5144568 kB

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

On Linux, the HugePages feature allocates non-swappable memory for large page tables
using memory-mapped files. If you enable HugePages, then you should deduct the memory
allocated to HugePages from the available RAM before calculating swap space.

If necessary, additional swap space can be configured by creating a temporary swap file and adding it to the current swap. This way you do not have to use a raw device or even more drastic, rebuild your
system.
1. As root, make a file that will act as additional swap space, let's say about 500MB.

[root@testnode1 ~]# dd if=/dev/zero of=tempswap bs=1k count=500000


2. Next, change the file permissions.

[root@testnode1 ~]# chmod 600 tempswap


3. Finally, format the "partition" as swap and add it to the swap space:

[root@testnode1 ~]# mke2fs tempswap


[root@testnode1 ~]# mkswap tempswap
[root@testnode1 ~]# swapon tempswap
To determine the available RAM and swap space, enter the following command.

[root@testnode1 ~]# free


total
used
Mem:
4020892
1209360
-/+ buffers/cache:
234152
Swap:
6258680
0

free
2811532
3786740
6258680

shared
0

buffers
49456

cached
925752

Automatic Memory Management


Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm) and file descriptors. The shared memory should be sized to be at least the greater of
MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer.
To determine the amount of shared memory available, enter the following command.

[root@testnode1 ~]# df -h /dev/shm/


Filesystem
Size Used Avail Use% Mounted on
tmpfs
2.0G
0 2.0G
0% /dev/shm

MEMORY_MAX_TARGET and MEMORY_TARGET cannot be used when LOCK_SGA is enabled


or with HugePages on Linux.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Network Configuration
During the Linux OS install, we already configured the IP address and host name for the database node. This sections contains additional network configuration steps that will prepare the machine to run the
Oracle database.
Note that the Oracle database server should have a static IP address configured for the public network (eth0 for this guide). Do not use DHCP naming for the public IP address; you need a static IP address.
Confirm the Node Name is Not Listed in Loopback Address
Ensure that the node name (testnode1) is not included for the loopback address in the /etc/hosts file. If the machine name is listed in the in the loopback address entry as below:

127.0.0.1

testnode1 localhost.localdomain localhost

it will need to be removed as shown below:

127.0.0.1

localhost.localdomain localhost

Confirm Fully Qualified Name for the Server in /etc/hosts


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
192.168.1.106

localhost.localdomain localhost
testnode1.idevelopment.info testnode1

Check and turn off UDP ICMP rejections


During the Linux OS install, I indicated to disable the firewall. By default the option to configure a firewall is selected by the installer. This has burned me several times so I like to do a double-check that the
firewall option is not configured and to ensure udp ICMP filtering is turned off.
1. Check to ensure that the firewall option is turned off. If the firewall option is stopped (like it is in my example below) you do not have to proceed with the following steps.

[root@testnode1 ~]# /etc/rc.d/init.d/iptables status


Firewall is stopped.
2. If the firewall option is operating, you will need to first manually disable UDP ICMP rejections.

[root@testnode1 ~]# /etc/rc.d/init.d/iptables stop


Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
3. Then, turn UDP ICMP rejections off for all subsequent server reboots (which should always be turned off).
Are you a developer? Try out the HTML to PDF API

open in browser PRO version

pdfcrowd.com

[root@testnode1 ~]# chkconfig iptables off

Configure Disks for Oracle ASM


As mentioned in the hardware configuration section of this guide, two hard disks will be configured as Oracle ASM volumes to store the database files (/dev/sdc) and the Fast Recovery Area (/dev/sdd)
which will be managed by Oracle ASM. During the Linux OS install, these two hard disks were not formatted using the Disk Partitioning Layout wizard. This section describes how these two hard disks can be
partitioned and then configured as Oracle ASM disks using ASMLib 2.0 which is an optional support library for the Oracle ASM feature of the Oracle Database.
Partition Oracle ASM Disks - (Optional)
Before using a hard disk as a physical volume for Oracle ASM, decide whether the entire disk will be used (/dev/sdc) or a disk partition (/dev/sdc1). In this guide, two unformatted hard disks were
earmarked to be Oracle ASM disks. Given that there is no information on these disks, it doesn't matter if you use the entire disk or whether to create a partition on each hard disk.
For the purpose of this guide, I decided to create a single partition on each hard disk.

[root@testnode1 ~]# fdisk /dev/sdc


The number of cylinders for this disk is set to 4699.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e
extended
p
primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-4699, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-4699, default 4699): 4699
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
-------------------------------------------------------------[root@testnode1 ~]# fdisk /dev/sdd
The number of cylinders for this disk is set to 4699.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Command action
e
extended
p
primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-4699, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-4699, default 4699): 4699
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

Install and Configure ASMLib 2.0 - (Optional)


ASMLib 2.0 is an optional support library for the Oracle ASM feature of the Oracle Database. In this guide, Oracle ASM will be used as the file system and volume manager for Oracle Database files (data, online
redo logs, control files, archived redo logs) and the Fast Recovery Area. Although optional, installing and configuring ASMLib is highly recommended as it allows a database using Oracle ASM more efficient and
capable access to the disk groups it is using. ASMLib was provided to enable Oracle ASM I/O to Linux disks without the limitations of the standard UNIX I/O API
Keep in mind that ASMLib is only a support library for the Oracle ASM software. The Oracle ASM software will be installed as part of Oracle Grid Infrastructure for a Standalone Server later in this guide.
So, is ASMLib required for Oracle ASM? Not at all. In fact, there are two different methods to configure Oracle ASM on Linux.
ASM with ASMLib I/O
This method creates all Oracle database files on raw block devices managed by Oracle ASM using ASMLib calls. RAW character devices are not required with this method as ASMLib works with block
devices.
ASM with Standard Linux I/O
This method does not make use of ASMLib. Oracle database files are created on raw character devices managed by ASM using standard Linux I/O system calls. You will be required to create RAW
devices for all disk partitions used by Oracle ASM.
This guide uses the "ASM with ASMLib I/O" method.
To learn more about Oracle ASMLib 2.0, visit http://www.oracle.com/technetwork/topics/linux/asmlib/index-101839.html.
Download ASMLib 2.0 Packages
Download the latest ASMLib 2.0 libraries and the kernel driver from the Oracle Technology Network (OTN) website.
Oracle ASMLib Downloads for Red Hat Enterprise Linux Server 5
At the time of this writing, the latest release of the ASMLib kernel driver is 2.0.5-1.
Download the appropriate version of the ASMLib driver for the Linux kernel release and machine architecture.

[root@testnode1 ~]# uname -r -m


2.6.18-238.el5 x86_64
The output above indicates Linux kernel release 2.6.18-238.el5 running on the x86_64 architecture.
32-bit (x86) Installations

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

oracleasm-2.6.18-238.el5PAE-2.0.5-1.el5.i686.rpm
Next, download the ASMLib tools.
oracleasm-support-2.1.7-1.el5.i386.rpm
oracleasmlib-2.0.4-1.el5.i386.rpm
64-bit (x86_64) Installations

oracleasm-2.6.18-238.el5-2.0.5-1.el5.x86_64.rpm
Next, download the ASMLib tools.
oracleasm-support-2.1.7-1.el5.x86_64.rpm
oracleasmlib-2.0.4-1.el5.x86_64.rpm
Install ASMLib 2.0 Packages
Install ASMLib 2.0 as the root user account.

[root@testnode1 ~]# rpm -Uvh oracleasm-2.6.18-238.el5-2.0.5-1.el5.x86_64.rpm \


>
oracleasmlib-2.0.4-1.el5.x86_64.rpm \
>
oracleasm-support-2.1.7-1.el5.x86_64.rpm
warning: oracleasm-2.6.18-238.el5-2.0.5-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...
########################################### [100%]
1:oracleasm-support
########################################### [ 33%]
2:oracleasm-2.6.18-238.el########################################### [ 67%]
3:oracleasmlib
########################################### [100%]
Verify the ASMLib packages were installed.

[root@testnode1 ~]# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n"| grep oracleasm | sort
oracleasm-2.6.18-238.el5-2.0.5-1.el5 (x86_64)
oracleasmlib-2.0.4-1.el5 (x86_64)
oracleasm-support-2.1.7-1.el5 (x86_64)

Configure ASMLib
After installing the ASMLib packages for Linux, configure and load the ASM kernel module. This task needs to be run as the root user account.
The oracleasm command by default is in the path /usr/sbin. The /etc/init.d path, which was used in previous releases of ASMLib, is not deprecated but the oracleasm binary in that path is now
used typically for internal commands. If you enter the command oracleasm configure without the -i flag, then you are shown the current configuration. For example,

[root@testnode1 ~]# /usr/sbin/oracleasm configure


ORACLEASM_ENABLED=false
ORACLEASM_UID=
ORACLEASM_GID=
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

1. Enter the following command to run the oracleasm initialization script with the configure option.

[root@testnode1 ~]# /usr/sbin/oracleasm configure -i


Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
The script completes the following tasks.
Creates the /etc/sysconfig/oracleasm configuration file
Creates the /dev/oracleasm mount point
Mounts the ASMLib driver file system

The ASMLib driver file system is not a regular file system. It is used only by the Automatic
Storage Management library to communicate with the Automatic Storage Management
driver.

2. Enter the following command to load the oracleasm kernel module:

[root@testnode1 ~]# /usr/sbin/oracleasm init


Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm

Label ASM Disks for Oracle


In the previous subsection, two hard disks were partitioned to be used by Oracle ASM. Use oracleasm to label the hard disk partitions for discovery by ASM.

[root@testnode1 ~]# /usr/sbin/oracleasm createdisk DATAVOL1 /dev/sdc1


Writing disk header: done
Instantiating disk: done
[root@testnode1 ~]# /usr/sbin/oracleasm createdisk FRAVOL1 /dev/sdd1
Writing disk header: done
Instantiating disk: done
Validate that the ASM disks were successfully created by using oracleasm listdisks. This command identifies any disks attached to the node that are marked as Oracle ASM disks.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

[root@testnode1 ~]# /usr/sbin/oracleasm listdisks


DATAVOL1
FRAVOL1
Perform one last check that the new Oracle ASM disks are mounted in the oracleasm file system.

[root@testnode1 ~]# ls -l /dev/oracleasm/disks


total 0
brw-rw---- 1 oracle asmadmin 8, 33 Jan 15 19:10 DATAVOL1
brw-rw---- 1 oracle asmadmin 8, 49 Jan 15 19:10 FRAVOL1

Download Oracle Software


Download and extract the required Oracle software packages from the Oracle Technology Network (OTN), Oracle Software Delivery Cloud (eDelivery), or My Oracle Support (MOS) website depending on your
support status.
Oracle Grid Infrastructure
OTN: Oracle Database 11g Release 2 Grid Infrastructure (11.2.0.1.0) for Linux x86
OTN: Oracle Database 11g Release 2 Grid Infrastructure (11.2.0.1.0) for Linux x86-64
eDelivery: Oracle Database 11g Release 2 Grid Infrastructure (11.2.0.1.0)
MOS: Oracle Database 11g Release 2 Grid Infrastructure (11.2.0.2 or 11.2.0.3)
Oracle Database
OTN: Oracle Database 11g Release 2 (11.2.0.1.0) for Linux x86
OTN: Oracle Database 11g Release 2 (11.2.0.1.0) for Linux x86-64
eDelivery: Oracle Database 11g Release 2 (11.2.0.1)
MOS: Oracle Database 11g Release 2 (11.2.0.2 or 11.2.0.3)
Oracle Grid Infrastructure and Oracle Database 11g Release 2 base release (11.2.0.1) is available through the Oracle Software Delivery Cloud (eDelivery) or OTN. If you do not currently have an account with
Oracle OTN or eDelivery, you will need to create one. This is a free account. Oracle offers a development and testing license free of charge. No support, however, is provided and the license does not permit
production use. A full description of the license agreement is available on OTN.
Oracle Grid Infrastructure and Oracle Database 11g Release 2 (11.2.0.2) and (11.2.0.3) are only available through My Oracle Support (MOS) and are listed as patch sets in this section.
Access to MOS requires an Oracle Single Sign On (SSO) account (which is the same account used for OTN) and a valid Customer Support Identifier (or CSI). MOS requires a paid software license and support
contract and is the only place to download critical updates and patch sets. Starting with the release of the 11.2.0.2 patch set for Oracle Database 11g Release 2, Oracle Database patch sets are full installations
of the Oracle Database software (you do not need to download and install 11.2.0.1 first).
Log in as the Oracle software owner (oracle) and download the Oracle Grid Infrastructure, Oracle Database, and Oracle Examples (optional) software to an install directory. For example
/home/oracle/software/oracle.
Oracle Database 11g Release 2 Grid Infrastructure (11.2.0.1.0) for Linux
Oracle Database 11g Release 2 (11.2.0.1.0) for Linux
Oracle Database 11g Release 2 Examples (optional)
Oracle Release 11.2.0.1
Oracle Software Component

open in browser PRO version

Release

Are you a developer? Try out the HTML to PDF API

Location

Associated Zip File(s)

pdfcrowd.com

Oracle Database 11g Release 2 Grid Infrastructure

11.2.0.1

OTN / eDelivery / MOS

linux.x64_11gR2_grid.zip

Oracle Database 11g Release 2

11.2.0.1

OTN / eDelivery / MOS

linux.x64_11gR2_database_1of2.zip
linux.x64_11gR2_database_2of2.zip

Oracle Database 11g Release 2 Examples

11.2.0.1

OTN / eDelivery / MOS

linux.x64_11gR2_examples.zip

[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1

~]$ mkdir -p /home/oracle/software/oracle


~]$ mv linux.x64_11gR2_grid.zip /home/oracle/software/oracle
~]$ mv linux.x64_11gR2_database_1of2.zip /home/oracle/software/oracle
~]$ mv linux.x64_11gR2_database_2of2.zip /home/oracle/software/oracle
~]$ mv linux.x64_11gR2_examples.zip /home/oracle/software/oracle
~]$ cd /home/oracle/software/oracle
oracle]$ unzip linux.x64_11gR2_grid.zip
oracle]$ unzip linux.x64_11gR2_database_1of2.zip
oracle]$ unzip linux.x64_11gR2_database_2of2.zip
oracle]$ unzip linux.x64_11gR2_examples.zip

Oracle Release 11.2.0.2 Patch Set


Oracle Software Component

Release

MOS Patch Set

Oracle Database 11g Release 2 Grid Infrastructure

11.2.0.2

10098816

p10098816_112020_Linux-x86-64_3of7.zip

Oracle Database 11g Release 2

11.2.0.2

10098816

p10098816_112020_Linux-x86-64_1of7.zip
p10098816_112020_Linux-x86-64_2of7.zip

Oracle Database 11g Release 2 Examples

11.2.0.2

10098816

p10098816_112020_Linux-x86-64_6of7.zip

[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1

Associated Zip File(s)

~]$ mkdir -p /home/oracle/software/oracle


~]$ mv p10098816_112020_Linux-x86-64_3of7.zip /home/oracle/software/oracle
~]$ mv p10098816_112020_Linux-x86-64_1of7.zip /home/oracle/software/oracle
~]$ mv p10098816_112020_Linux-x86-64_2of7.zip /home/oracle/software/oracle
~]$ mv p10098816_112020_Linux-x86-64_6of7.zip /home/oracle/software/oracle
~]$ cd /home/oracle/software/oracle
oracle]$ unzip p10098816_112020_Linux-x86-64_3of7.zip
oracle]$ unzip p10098816_112020_Linux-x86-64_1of7.zip
oracle]$ unzip p10098816_112020_Linux-x86-64_2of7.zip
oracle]$ unzip p10098816_112020_Linux-x86-64_6of7.zip

Oracle Release 11.2.0.3 Patch Set


Oracle Software Component

Release

MOS Patch Set

Oracle Database 11g Release 2 Grid Infrastructure

11.2.0.3

10404530

p10404530_112030_Linux-x86-64_3of7.zip

Oracle Database 11g Release 2

11.2.0.3

10404530

p10404530_112030_Linux-x86-64_1of7.zip
p10404530_112030_Linux-x86-64_2of7.zip

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

Associated Zip File(s)

pdfcrowd.com

Oracle Database 11g Release 2 Examples

[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1
[oracle@testnode1

11.2.0.3

10404530

p10404530_112030_Linux-x86-64_6of7.zip

~]$ mkdir -p /home/oracle/software/oracle


~]$ mv p10404530_112030_Linux-x86-64_3of7.zip /home/oracle/software/oracle
~]$ mv p10404530_112030_Linux-x86-64_1of7.zip /home/oracle/software/oracle
~]$ mv p10404530_112030_Linux-x86-64_2of7.zip /home/oracle/software/oracle
~]$ mv p10404530_112030_Linux-x86-64_6of7.zip /home/oracle/software/oracle
~]$ cd /home/oracle/software/oracle
oracle]$ unzip p10404530_112030_Linux-x86-64_3of7.zip
oracle]$ unzip p10404530_112030_Linux-x86-64_1of7.zip
oracle]$ unzip p10404530_112030_Linux-x86-64_2of7.zip
oracle]$ unzip p10404530_112030_Linux-x86-64_6of7.zip

You should now have directories called grid, database, and the optional examples directory containing the Oracle installation files.

Pre-Installation Tasks
Oracle Grid Infrastructure for a Standalone Server
This subsection contains any remaining pre-installation tasks for Oracle Database 11g Release 2 Grid Infrastructure for a Standalone Server that have not already been discussed.
Fixup Scripts

Oracle Universal Installer (OUI) detects when the minimum requirements for an installation are not met and creates shell scripts called fixup scripts to finish incomplete system configuration steps. If OUI detects
an incomplete task, it then generates fixup scripts (runfixup.sh). You can run the fixup script after you click the [Fix and Check Again Button] during the Oracle Grid Infrastructure installation.
Verify Oracle Restart Requirements with CVU - (optional)

Oracle recommends to run the Cluster Verification Utility (CVU) script runcluvfy.sh before installing Oracle Grid Infrastructure for a Standalone Server to verify the environment for Oracle Restart. Note that
manually running the CVU before running the Oracle installer is not required. If you decide that you want to run the CVU, keep in mind that it should be run as the oracle user with user equivalence configured
for the oracle user. If user equivalence is not configured for the oracle user account, the CVU utility will fail before having the opportunity to perform any of its critical checks and generate the fixup scripts:

[oracle@testnode1 ~]$ cd /home/oracle/software/oracle/grid


[oracle@testnode1 grid]$ runcluvfy.sh stage -pre hacfg
Performing pre-checks for Oracle Restart configuration
Checking node reachability...
Node reachability check passed from node "testnode1"
Checking user equivalence...
PRVF-4007 : User equivalence check failed for user "oracle"
Check failed on nodes:
testnode1
ERROR:
User equivalence unavailable on all the specified nodes
Verification cannot proceed

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Pre-check for Oracle Restart configuration was unsuccessful.


If you decide to run the CVU, configure user equivalence for the oracle user account and run runcluvfy.sh stage -pre hacfg to verify that the server meets the installation requirements for Oracle
Restart.

[oracle@testnode1 ~]$ mkdir ~/.ssh


[oracle@testnode1 ~]$ chmod 700 ~/.ssh
[oracle@testnode1 ~]$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa): [Enter]
Enter passphrase (empty for no passphrase): [Enter]
Enter same passphrase again: [Enter]
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
21:c8:86:e7:0b:c7:73:82:de:2c:79:79:37:d6:15:92 oracle@testnode1.idevelopment.info
[oracle@testnode1 ~]$ touch ~/.ssh/authorized_keys
[oracle@testnode1 ~]$ ssh testnode1 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'testnode1 (192.168.1.106)' can't be established.
RSA key fingerprint is 6f:62:7a:0d:c5:91:fb:31:fe:67:4a:24:64:b6:f7:4d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'testnode1,192.168.1.106' (RSA) to the list of known hosts.
oracle@testnode1's password: xxxx
[oracle@testnode1 ~]$ chmod 600 ~/.ssh/authorized_keys
[oracle@testnode1 ~]$ ssh testnode1 "date;hostname"
Thu Jan 12 19:47:51 EST 2012
testnode1.idevelopment.info
[oracle@testnode1 ~]$ cd /home/oracle/software/oracle/grid
[oracle@testnode1 grid]$ runcluvfy.sh stage -pre hacfg
Review the CVU report.
Oracle Database
All pre-installation tasks have already been performed to successfully install and configure the Oracle Database 11g Release 2 software.

Install Oracle Grid Infrastructure for a Standalone Server


The Oracle Grid Infrastructure for a Standalone Server is the Oracle software that provides system support for an Oracle database including volume management, file system, and automatic restart capabilities.
Whenever planning to use Oracle Restart or Oracle Automatic Storage Management (Oracle ASM), then you must install Oracle Grid Infrastructure for a Standalone Server before you install and create the
database. Oracle Grid Infrastructure for a Standalone Server is the software that includes Oracle Restart and Oracle ASM. Oracle combines the two infrastructure products into a single set of binaries that is
installed in the Oracle Grid Infrastructure home. The Oracle Grid Infrastructure home for this guide will be /u01/app/oracle/product/11.2.0/grid.
Log into the node as the Oracle software owner (oracle). If you are using X emulation then set the DISPLAY environmental variable accordingly.

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


Before starting the OUI, make certain to either unset $TNS_ADMIN or set it appropriately for the Grid Infrastructure home environment (/u01/app/oracle/product/11.2.0/grid/network/admin).

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Before starting the OUI, make certain to either unset $TNS_ADMIN or set it appropriately for
the Grid Infrastructure home environment
(/u01/app/oracle/product/11.2.0/grid/network/admin) as described in the
login script for the Oracle user account.
Failure to set $TNS_ADMIN to the Grid Infrastructure environment (or unsetting it) before the
Grid Infrastructure install will result in a failure by NETCA to create the default listener
configuration file (listener.ora) as described in the troubleshooting section to this guide.

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

[oracle@testnode1 ~]$ id
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),504(asmadmin),505(asmdba),506(asmoper)
[oracle@testnode1 ~]$ echo $TNS_ADMIN
/u01/app/oracle/product/11.2.0/grid/network/admin
[oracle@testnode1 ~]$ cd /home/oracle/software/oracle/grid
[oracle@testnode1 grid]$ ./runInstaller
At any time during installation, if you have a question about what you are being asked to do, click the Help button on the OUI page.
Screen Name

Response

Installation
Option

Select "Install and Configure Grid Infrastructure for a Standalone Server".

Product
Languages

Make the appropriate selection(s) for your environment.

Screen Shot

The C reate ASM Disk Group screen lists all of the Oracle ASM candidate disks that were labeled during the ASMLib configuration.
Note that the C reate ASM Disk Group wizard only allows for the configuration of one disk group. Using this wizard, create an Oracle ASM disk
group that will be used for database files. A second Oracle ASM disk group will be created for the recovery files (Fast Recovery Area) later in
this guide using the Oracle Automatic Storage Management C onfiguration Assistant (Oracle ASMC A).
C reate an ASM Disk Group that will be used to store the database files for the example database described in this guide according to the values
in the table below.
Create ASM
Disk Group

If the Oracle ASM disks do not show up in the "Select Member Disks" window as eligible (ORCL:DATAVOL1 and ORCL:FRAVOL1) then click on the
[C hange Disk Discovery Path] button and input "ORCL:*".
Disk Group Name
TESTDB1_DATA

Redundancy
External

Disk Path
ORCL:DATAVOL1

During installation, disk paths mounted on Oracle ASM and registered on ASMLIB with the string ORCL:* are listed as default database storage
candidate disks.
Enter the SYSASM password required to connect to the Oracle ASM instance. The Oracle ASM instance is managed by a privileged role called
SYSASM, which grants full access to Oracle ASM disk groups. Oracle recommends that you create a less privileged user, ASMSNMP, with SYSDBA
privileges to monitor the Oracle ASM instance.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Specify ASM
Password

privileges to monitor the Oracle ASM instance.


Enter passwords for the SYS and ASMSNMP database accounts. The passwords should be at least eight characters in length and include at least
one alphabetic and one numeric character.
To specify the same password for both accounts, select "Use same passwords for these accounts".
This guide makes use of role-based administrative privileges and high granularity in specifying Automatic Storage Management roles.

Privileged
Operating
System
Groups

Make any changes necessary to match the values in the table below.
OSDBA for ASM
asmdba

Specify
Installation
Location

OSOPER for ASM


asmoper

OSASM
asmadmin

Set the "Oracle Base" ($ORACLE_BASE) and "Software Location" ($ORACLE_HOME) for the Oracle Grid Infrastructure for a Standalone Server
installation.
Oracle Base: /u01/app/oracle
Software Location: /u01/app/oracle/product/11.2.0/grid
Since this is the first install on the host, you will need to create the Oracle Inventory. Use the default values provided by the OUI.

Create
Inventory

Inventory Directory: /u01/app/oraInventory


oraInventory Group Name: oinstall
The installer will run through a series of checks to determine if the node meets the minimum requirements for installing and configuring the
Oracle Restart and Oracle Automatic Storage Management software.

Prerequisite
Checks

Starting with Oracle Grid Infrastructure 11g Release 2 (11.2), if any check fails, the installer (OUI) will create shell script programs called fixup
scripts to resolve many incomplete system configuration requirements. If OUI detects an incomplete task that is marked "fixable", then you can
easily fix the issue by generating the fixup script by clicking the [Fix & Check Again] button.
The fixup script is generated during installation. You will be prompted to run the script as root in a separate terminal session. When you run the
script, it raises kernel values to required minimums, if necessary, and completes other operating system configuration tasks.
If the OUI detected any failed checks, take the appropriate action to resolve it or click the "Ignore All" check box to acknowledge it is safe to
continue with the installation without resolving the issue.
If all prerequisite checks pass, the OUI continues to the Summary screen.

Summary

C lick [Finish] to start the installation.

Install
Product

The installer performs the Oracle Grid Infrastructure for a Standalone Server software installation.
After the installation completes, you will be prompted to execute root scripts to configure the Oracle Inventory, Oracle Grid Infrastructure, and
Automatic Storage Management software.
Note: Do not click OK until you run the scripts mentioned in this screen.
Open a new terminal window as the root user account and execute the orainstRoot.sh script.

Execute
Configuration
scripts

[root@testnode1 ~]# /u01/app/oraInventory/orainstRoot.sh


Within the same terminal window stay logged in as the root user account and execute the root.sh script.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

[root@testnode1 ~]# /u01/app/oracle/product/11.2.0/grid/root.sh

[11.2.0.1.0]

[root@testnode1 ~]# /u01/app/oracle/product/11.2.0/grid/root.sh

[11.2.0.2.0]

[root@testnode1 ~]# /u01/app/oracle/product/11.2.0/grid/root.sh

[11.2.0.3.0]

Go back to OUI and acknowledge the "Execute C onfiguration scripts" dialog window.
Run Grid
Infrastructure
Assistants

The OUI will continue by configuring Oracle Grid Infrastructure for a Standalone Server using the Oracle Net C onfiguration Assistant and the
Automatic Storage Management C onfiguration Assistant. C omponents will then be registered with Oracle Restart.

Finish

At the end of the installation, click the [Close] button to exit the OUI.

Post-installation Tasks for Oracle Grid Infrastructure for a Standalone Server


After the installation of Oracle Grid Infrastructure for a Standalone Server, use the SRVCTL and CRSCTL commands to verify the Oracle Restart configuration.
Use SRVCTL and CRSCTL commands out of the Oracle Home directory for Oracle Grid Infrastructure to modify and view component information for the Oracle Restart configuration. In a terminal window as the
oracle user, set the environment to use the Oracle Home for Oracle Grid Infrastructure with . oraenv and enter the ORACLE_SID +ASM when prompted.

[oracle@testnode1 ~]$ . oraenv


ORACLE_SID = [testdb1] ? +ASM
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle

Verify Oracle High Availability Service is Installed

[oracle@testnode1 ~]$ crsctl check has


CRS-4638: Oracle High Availability Services is online

Verify Status and Configuration Information


11.2.0.1.0

[oracle@testnode1 ~]$ crsctl status resource


NAME=ora.LISTENER.lsnr
TYPE=ora.listener.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.TESTDB1_DATA.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.asm
TYPE=ora.asm.type
TARGET=ONLINE
STATE=ONLINE on testnode1

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

NAME=ora.cssd
TYPE=ora.cssd.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.diskmon
TYPE=ora.diskmon.type
TARGET=ONLINE
STATE=ONLINE on testnode1
11.2.0.2.0

[oracle@testnode1 ~]$ crsctl status resource


NAME=ora.LISTENER.lsnr
TYPE=ora.listener.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.TESTDB1_DATA.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.asm
TYPE=ora.asm.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.cssd
TYPE=ora.cssd.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.diskmon
TYPE=ora.diskmon.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.evmd
TYPE=ora.evm.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.ons
TYPE=ora.ons.type
TARGET=OFFLINE
STATE=OFFLINE
11.2.0.3.0

[oracle@testnode1 ~]$ crsctl status resource

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

NAME=ora.LISTENER.lsnr
TYPE=ora.listener.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.TESTDB1_DATA.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.asm
TYPE=ora.asm.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.cssd
TYPE=ora.cssd.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.diskmon
TYPE=ora.diskmon.type
TARGET=OFFLINE
STATE=OFFLINE
NAME=ora.evmd
TYPE=ora.evm.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.ons
TYPE=ora.ons.type
TARGET=OFFLINE
STATE=OFFLINE

Verify Oracle ASM Component


Use SRVCTL to view the Oracle Restart configuration for the Oracle ASM component.

[oracle@testnode1 ~]$ srvctl config asm


ASM home: /u01/app/oracle/product/11.2.0/grid
ASM listener: LISTENER
Spfile: +TESTDB1_DATA/asm/asmparameterfile/registry.253.772632389
ASM diskgroup discovery string:

Verify Oracle Net Listener Component


Use SRVCTL to view the Oracle Restart configuration for the Oracle Net Listener component.

[oracle@testnode1 ~]$ srvctl config listener


Name: LISTENER
Home: /u01/app/oracle/product/11.2.0/grid

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

End points: TCP:1521

Verify Component Status


Use SRVCTL to view the running status (running or not running) for any component managed by Oracle Restart.

[oracle@testnode1 ~]$ srvctl status listener


Listener LISTENER is enabled
Listener LISTENER is running on node(s): testnode1
[oracle@testnode1 ~]$ srvctl status asm -a
ASM is running on testnode1
ASM is enabled.

Verify Oracle ASM Server Parameter File


Use ASMCMD and the spget command to retrieve the location of the Oracle ASM SPFILE registered in Oracle Restart.

[oracle@testnode1 ~]$ asmcmd


ASMCMD> spget
+TESTDB1_DATA/asm/asmparameterfile/registry.253.772632389

Check Clusterware Resources


11.2.0.1.0

[oracle@testnode1 ~]$ crs_stat -t -v


Name
Type
R/RA
F/FT
Target
State
Host
---------------------------------------------------------------------ora....ER.lsnr ora....er.type 0/5
0/
ONLINE
ONLINE
testnode1
ora....DATA.dg ora....up.type 0/5
0/
ONLINE
ONLINE
testnode1
ora.asm
ora.asm.type
0/5
0/
ONLINE
ONLINE
testnode1
ora.cssd
ora.cssd.type 0/5
0/5
ONLINE
ONLINE
testnode1
ora.diskmon
ora....on.type 0/10
0/5
ONLINE
ONLINE
testnode1
11.2.0.2.0

[oracle@testnode1 ~]$ crs_stat -t -v


Name
Type
R/RA
F/FT
Target
State
Host
---------------------------------------------------------------------ora....ER.lsnr ora....er.type 0/5
0/
ONLINE
ONLINE
testnode1
ora....DATA.dg ora....up.type 0/5
0/
ONLINE
ONLINE
testnode1
ora.asm
ora.asm.type
0/5
0/
ONLINE
ONLINE
testnode1
ora.cssd
ora.cssd.type 0/5
0/5
ONLINE
ONLINE
testnode1
ora.diskmon
ora....on.type 0/10
0/5
ONLINE
ONLINE
testnode1
ora.evmd
ora.evm.type
0/10
0/5
ONLINE
ONLINE
testnode1

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

ora.ons

ora.ons.type

0/3

0/

OFFLINE

OFFLINE

11.2.0.3.0

[oracle@testnode1 ~]$ crs_stat -t -v


Name
Type
R/RA
F/FT
Target
State
Host
---------------------------------------------------------------------ora....ER.lsnr ora....er.type 0/5
0/
ONLINE
ONLINE
testnode1
ora....DATA.dg ora....up.type 0/5
0/
ONLINE
ONLINE
testnode1
ora.asm
ora.asm.type
0/5
0/
ONLINE
ONLINE
testnode1
ora.cssd
ora.cssd.type 0/5
0/5
ONLINE
ONLINE
testnode1
ora.diskmon
ora....on.type 0/10
0/5
OFFLINE
OFFLINE
ora.evmd
ora.evm.type
0/10
0/5
ONLINE
ONLINE
testnode1
ora.ons
ora.ons.type
0/3
0/
OFFLINE
OFFLINE
Notice that the state of the ora.diskmon resource is OFFLINE after completing the Grid Infrastructure 11.2.0.3 installation while in previous releases it was ONLINE. Starting with Grid Infrastructure 11.2.0.3,
the ora.diskmon resource is used for Oracle Exadata fencing. For a non-Exadata machine, this resource will be OFFLINE.

The crs_stat command is deprecated in Oracle Clusterware 11g Release 2 (11.2).

Create Separate ASM Disk Group for the Fast Recovery Area
Run the Oracle Automatic Storage Management Configuration Assistant (Oracle ASMCA) as the oracle user account to create any additional Oracle ASM disk groups that will be used to create the example
database described in this guide.
During the installation of Oracle Grid Infrastructure for a Standalone Server, the Create ASM Disk Group wizard only allowed for the configuration of one disk group. Using that wizard, an Oracle ASM disk group
named TESTDB1_DATA was created for database files. In this section, create an additional Oracle ASM disk group named FRA for the Fast Recovery Area.
Start the Oracle ASMCA by executing the asmca command as the oracle use account in the Oracle Home for Oracle Grid Infrastructure.

[oracle@testnode1 ~]$ asmca &


Screen Name
Disk Groups

Response

Screen Shot

From the "Disk Groups" tab, click the [Create] button.


The "C reate Disk Group" dialog should show the last remaining Oracle ASM candidate disk that were labeled during the ASMLib configuration.

Create Disk
Group

If the Oracle ASM disk does not show up in the "Select Member Disks" window as eligible (ORCL:FRAVOL1) then click on the [C hange Disk Discovery Path] button
and input "ORCL:*".
When creating the "Fast Recovery Area" disk group, use "FRA" for the "Disk Group Name". In the "Redundancy" section, choose "External (None)". Finally,
check the Oracle ASM disk "ORCL:FRAVOL1" in the "Select Member Disks" section.
After verifying all values in this dialog are correct, click the [OK] button.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Disk Groups

Exit the ASM C onfiguration Assistant by clicking the [Exit] button.

Install Oracle Database


For the purpose of this example, we will forgo the "Create Database" option when installing the Oracle Database software. The database will be created later in this guide using the Database Configuration
Assistant (DBCA) after all installs have been completed.
Before starting the OUI, make certain that the $ORACLE_HOME and $PATH are set appropriately for the $ORACLE_BASE/product/11.2.0/dbhome_1 environment. Setting environment variables in the login
script for the oracle user account was covered in the section "Create Login Script for the oracle User Account".
Start the OUI by issuing the following command in the database install directory.

[oracle@testnode1 ~]$ id
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),504(asmadmin),505(asmdba),506(asmoper)
[oracle@testnode1 ~]$ . .bash_profile
[oracle@testnode1 ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/dbhome_1
[oracle@testnode1 ~]$ cd /home/oracle/software/oracle/database
[oracle@testnode1 database]$ ./runInstaller
At any time during installation, if you have a question about what you are being asked to do, click the Help button on the OUI page.
Screen Name

Configure
Security
Updates

Response

Screen Shot

To stay informed with the latest security issues, enter your e-mail address, preferably your My Oracle Support e-mail address or user name in
the Email field. You can select the "I wish to receive security updates via My Oracle Support" check box to receive security updates. Enter your
My Oracle Support password in the "My Oracle Support Password" field.
For the purpose of this example, un-check the security updates check-box and click the [Next] button to continue.
Acknowledge the warning dialog indicating you have not provided an email address by clicking the [Yes] button.

Installation
Option

Select "Install database software only".

Grid Options

Select "Single instance database installation".

Product
Languages

Make the appropriate selection(s) for your environment.

Database
Edition

Select "Enterprise Edition".


Specify the Oracle base and Software location (Oracle home) as follows.

Installation
Location

Operating

Oracle Base: /u01/app/oracle


Software Location: /u01/app/oracle/product/11.2.0/dbhome_1
Select the OS groups to be used for the SYSDBA and SYSOPER privileges.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

System
Groups

Database Administrator (OSDBA) Group: dba


Database Operator (OSOPER) Group: oper
The installer will run through a series of checks to determine if the machine and OS configuration meet the minimum requirements for installing
the Oracle Database software.

Prerequisite
Checks

Starting with 11g Release 2, if any checks fail, the installer (OUI) will create shell script programs called fixup scripts to resolve many incomplete
system configuration requirements. If OUI detects an incomplete task that is marked "fixable", then you can easily fix the issue by generating
the fixup script by clicking the [Fix & Check Again] button.
The fixup script is generated during installation. You will be prompted to run the script as root in a separate terminal session. When you run the
script, it raises kernel values to required minimums, if necessary, and completes other operating system configuration tasks.
If the OUI detected any failed checks, take the appropriate action to resolve it or click the "Ignore All" check box to acknowledge it is safe to
continue with the installation without resolving the issue.
If all prerequisite checks pass, the OUI continues to the Summary screen.

Summary

C lick [Finish] to start the installation.

Install
Product

The installer performs the Oracle Database software installation.


After the installation completes, you will be prompted to run the root script. Open a new terminal window as the root user account and execute
the root.sh script.

Execute
Configuration
scripts

[root@testnode1 ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

[11.2.0.1.0]

[root@testnode1 ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

[11.2.0.2.0]

[root@testnode1 ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

[11.2.0.3.0]

Go back to OUI and acknowledge the "Execute C onfiguration scripts" dialog window.
Finish

At the end of the installation, click the [Close] button to exit the OUI.

Install Oracle Database Examples


Now that the Oracle Database 11g Release 2 software is installed, you have the option to install the Oracle Database 11g Release 2 Examples.
Start the Oracle Universal Installer (OUI) by issuing the following command in the examples install directory as the Oracle software owner (oracle).

[oracle@testnode1 ~]$ cd /home/oracle/software/oracle/examples


[oracle@testnode1 examples]$ ./runInstaller
At any time during installation, if you have a question about what you are being asked to do, click the Help button on the OUI page.
Screen Name

Response

Screen Shot

Specify the Oracle base and Software location (Oracle home) as follows.
Installation
Location

Oracle Base: /u01/app/oracle


Software Location: /u01/app/oracle/product/11.2.0/dbhome_1

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

The installer will run through a series of checks to determine if the machine and OS configuration meet the minimum requirements for installing
the Oracle Database Examples software.

Prerequisite
Checks

Starting with 11g Release 2, if any checks fail, the installer (OUI) will create shell script programs called fixup scripts to resolve many incomplete
system configuration requirements. If OUI detects an incomplete task that is marked "fixable", then you can easily fix the issue by generating the
fixup script by clicking the [Fix & Check Again] button.
The fixup script is generated during installation. You will be prompted to run the script as root in a separate terminal session. When you run the
script, it raises kernel values to required minimums, if necessary, and completes other operating system configuration tasks.
If the OUI detected any failed checks, take the appropriate action to resolve it or click the "Ignore All" check box to acknowledge it is safe to
continue with the installation without resolving the issue.
If all prerequisite checks pass, the OUI continues to the Summary screen.

Summary

C lick [Finish] to start the installation.

Install
Product

The installer performs the Oracle Database Examples software installation.

Finish

At the end of the installation, click the [Close] button to exit the OUI.

Create the Oracle Database


Use the Oracle Database Configuration Assistant (DBCA) to create the database.
Before executing the DBCA, make certain that the $ORACLE_HOME and $PATH are set appropriately for the $ORACLE_BASE/product/11.2.0/dbhome_1 environment. Setting environment variables in the
login script for the oracle user account was covered in the section "Create Login Script for the oracle User Account".
You should also verify that all services installed up to this point (Oracle TNS Listener and Oracle ASM) are running on the node before attempting to start the database creation process.

[oracle@testnode1 ~]$ srvctl status listener


Listener LISTENER is enabled
Listener LISTENER is running on node(s): testnode1
[oracle@testnode1 ~]$ srvctl status asm -a
ASM is running on testnode1
ASM is enabled.

Create the Database


To start the database creation process, run the following as the Oracle software owner (oracle).

[oracle@testnode1 ~]$ dbca &


Screen Name
Welcome
Screen

Response

Screen Shot

C lick [Next] to continue.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Operations

Select Create a Database.

Database
Templates

Select Custom Database.


Database naming.

Database
Identification

Global Database Name: testdb1.idevelopment.info


SID Prefix: testdb1
Note: I used idevelopment.info for the database domain. You may use any database domain. Keep in mind that this domain does not have to be a valid DNS
domain.

Management
Options

From the "Enterprise Manager" tab, you can leave the default option here which is to Configure Enterprise Manager / Configure Database Control for
local management.
Using the "Automatic Maintenance Tasks" tab, leave the default option which is to Enable automatic maintenance tasks.

Database
Credentials

Secure the database with passwords for the most important database administrator accounts. Enter passwords for the SYS, SYSTEM, DBSNMP, and SYSMAN
database accounts. The passwords should be at least eight characters in length and include at least one alphabetic and one numeric character.
To specify the same password for all accounts, Use the Same Administrative Password for All Accounts.
Specify storage type and locations for database files.

Database File
Locations

Specify
ASMSNMP
Password

Storage Type: Automatic Storage Management (ASM)


Storage Locations: Use Oracle-Managed Files
Database Area: +TESTDB1_DATA

Specify the ASMSNMP password for the ASM instance.

C heck the option for Specify Flash Recovery Area.


Recovery
Configuration

Flash Recovery Area: +FRA


Flash Recovery Area Size: Use Oracle-Managed Files
My disk group has a size of about 36GB. When defining the Fast Recovery Area size, use the entire volume minus 10% for overhead (36-10%=32 GB). I used
a Fast Recovery Area Size of 32 GB (32768 MB).

Database
Content

I left all of the Database C omponents (and destination tablespaces) set to their default value although it is perfectly OK to select the Sample Schemas. This
option is available since we installed the Oracle Database 11g Examples.

Initialization
Parameters

C hange any parameters for your environment. I left them all at their default settings for this example.

Database
Storage

C hange any parameters for your environment. I left them all at their default settings for this example.

Creation
Options

Keep the default option Create Database selected. I also always select to Generate Database Creation Scripts. C lick Finish to start the database creation
process. After acknowledging the database creation report and script generation dialog, the database creation will start.
C lick OK on the "Summary" screen.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Database
Creation
Process

Wait for the database process to complete.

End of
Database
Creation

At the end of the database creation, exit from the DBC A.

When the DBCA has completed, you will have a fully functional Oracle Restart enabled Oracle Database 11g Release 2 database running using Oracle ASM.
Verify Oracle Restart
From the Oracle home for Grid Infrastructure.
11.2.0.1.0

[oracle@testnode1 ~]$ crsctl status resource


NAME=ora.FRA.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.LISTENER.lsnr
TYPE=ora.listener.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.TESTDB1_DATA.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.asm
TYPE=ora.asm.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.cssd
TYPE=ora.cssd.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.diskmon
TYPE=ora.diskmon.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.testdb1.db
TYPE=ora.database.type
TARGET=ONLINE
STATE=ONLINE on testnode1

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

[oracle@testnode1 ~]$ crs_stat -t -v


Name
Type
R/RA
F/FT
Target
State
Host
---------------------------------------------------------------------ora.FRA.dg
ora....up.type 0/5
0/
ONLINE
ONLINE
testnode1
ora....ER.lsnr ora....er.type 0/5
0/
ONLINE
ONLINE
testnode1
ora....DATA.dg ora....up.type 0/5
0/
ONLINE
ONLINE
testnode1
ora.asm
ora.asm.type
0/5
0/
ONLINE
ONLINE
testnode1
ora.cssd
ora.cssd.type 0/5
0/5
ONLINE
ONLINE
testnode1
ora.diskmon
ora....on.type 0/10
0/5
ONLINE
ONLINE
testnode1
ora.testdb1.db ora....se.type 0/2
0/1
ONLINE
ONLINE
testnode1
11.2.0.2.0

[oracle@testnode1 ~]$ crsctl status resource


NAME=ora.FRA.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.LISTENER.lsnr
TYPE=ora.listener.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.TESTDB1_DATA.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.asm
TYPE=ora.asm.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.cssd
TYPE=ora.cssd.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.diskmon
TYPE=ora.diskmon.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.evmd
TYPE=ora.evm.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.ons
TYPE=ora.ons.type
TARGET=OFFLINE
STATE=OFFLINE

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

NAME=ora.testdb1.db
TYPE=ora.database.type
TARGET=ONLINE
STATE=ONLINE on testnode1
11.2.0.3.0

NAME=ora.FRA.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.LISTENER.lsnr
TYPE=ora.listener.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.TESTDB1_DATA.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.asm
TYPE=ora.asm.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.cssd
TYPE=ora.cssd.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.diskmon
TYPE=ora.diskmon.type
TARGET=OFFLINE
STATE=OFFLINE
NAME=ora.evmd
TYPE=ora.evm.type
TARGET=ONLINE
STATE=ONLINE on testnode1
NAME=ora.ons
TYPE=ora.ons.type
TARGET=OFFLINE
STATE=OFFLINE
NAME=ora.testdb1.db
TYPE=ora.database.type
TARGET=ONLINE
STATE=ONLINE on testnode1

Test Database Connectivity

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

From the Oracle home for Oracle Database.


Verify that the TNS listener is running (lsnrctl status) then log in to the new instance to verify database connectivity and perform a few queries.

[oracle@testnode1 ~]$ sqlplus system/*******@testdb1


SQL> SELECT user FROM dual;
USER
-----------------------------SYSTEM
SQL> SELECT systimestamp FROM dual;
SYSTIMESTAMP
----------------------------------------15-JAN-12 05.39.35.746417 PM -05:00
SQL> SELECT owner, COUNT(owner) AS "OBJECT_COUNT" FROM dba_objects GROUP BY owner;
OWNER
OBJECT_COUNT
------------------------------ -----------OWBSYS_AUDIT
12
MDSYS
1509
PUBLIC
27702
OUTLN
9
CTXSYS
366
OLAPSYS
719
HR
34
FLOWS_FILES
12
OWBSYS
2
SYSTEM
529
ORACLE_OCM
8
EXFSYS
310
APEX_030200
2406
DBSNMP
65
ORDSYS
2532
ORDPLUGINS
10
OE
127
PM
27
SH
306
SYSMAN
3491
APPQOSSYS
3
XDB
844
ORDDATA
248
IX
55
BI
8
SYS
30796
WMSYS
316
SI_INFORMTN_SCHEMA
8
28 rows selected.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Oracle Enterprise Manager


If you configured Oracle Enterprise Manager (Database Control), it can be used to view the database configuration and current status of the database.
The URL for this example is: https://testnode1.idevelopment.info:1158/em/

[oracle@testnode1 ~]$ emctl status dbconsole


Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://testnode1.idevelopment.info:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
-----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/testnode1.idevelopment.info_testdb1/sysman/log

Make certain to run emctl from $ORACLE_HOME/bin and not from $GRID_HOME/bin as
described in the Troubleshooting section to this guide.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Figure 1: Oracle Enterprise Manager - (Database Console)

Post Database Creation Tasks - (Optional)


This section offers several optional tasks that can be performed on your new Oracle 11g environment in order to enhance availability as well as database management.
Re-compile Invalid Objects
Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.

[oracle@testnode1 ~]$ sqlplus / as sysdba


SQL> @?/rdbms/admin/utlrp.sql

Enabling Archive Logs


Whether a single instance or clustered database, Oracle tracks and logs all changes to database blocks in online redolog files. An Oracle instance will use its group of online redologs in a circular manner.
Once an online redolog fills, Oracle moves to the next one. If the database is in "Archive Log Mode", Oracle will make a copy of the online redo log before it gets reused. A thread (an Oracle instance) must
contain at least two online redologs (or online redolog groups).
As already mentioned, Oracle writes to its online redolog files in a circular manner. When the current online redolog fills, Oracle will switch to the next one. To facilitate media recovery, Oracle allows the DBA to
put the database into "Archive Log Mode" which makes a copy of the online redolog after it fills (and before it gets reused). This is a process known as archiving.
The Database Configuration Assistant (DBCA) allows users to configure a new database to be in archive log mode within the Recovery Configuration section; however most DBA's opt to bypass this option during
initial database creation. In cases like this where the database is in no archive log mode, it is a simple task to put the database into archive log mode. Note however that this will require a short database outage.
1. Log in to the database as a user with SYSDBA privileges and shut down the instance.

[oracle@testnode1 ~]$ sqlplus / as sysdba


SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
2. After shutting down the instance, mount the database.

SQL> startup mount


ORACLE instance started.
Total System Global Area 1657225216 bytes
Fixed Size
1336904 bytes
Variable Size
973081016 bytes
Database Buffers
671088640 bytes
Redo Buffers
11718656 bytes
3. Enable archiving.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

SQL> alter database archivelog;


Database altered.
4. Open the database.

SQL> alter database open;


Database altered.
5. Verify Archive Log Mode is enabled.

SQL> archive log list


Database log mode
Automatic archival
Archive destination
Oldest online log sequence
Next log sequence to archive
Current log sequence

Archive Mode
Enabled
USE_DB_RECOVERY_FILE_DEST
75
77
77

Download and Install Custom Oracle Database Scripts


DBA's rely on Oracle's data dictionary views and dynamic performance views in order to support and better manage their databases. Although these views provide a simple and easy mechanism to query critical
information regarding the database, it helps to have a collection of accurate and readily available SQL scripts to query these views.
In this section you will download and install a collection of Oracle DBA scripts that can be used to manage many aspects of your database including space management, performance, backups, security, and
session management. The DBA Scripts Archive for Oracle can be downloaded using the following link http://www.idevelopment.info/data/Oracle/DBA_scripts/dba_scripts_archive_Oracle.zip. As the Oracle
software owner (oracle), download the dba_scripts_archive_Oracle.zip archive to the $ORACLE_BASE directory. For the purpose of this example, the dba_scripts_archive_Oracle.zip
archive will be copied to /u01/app/oracle. Next, unzip the archive file to the $ORACLE_BASE directory.
For example:

[oracle@testnode1 ~]$ cp Downloads/dba_scripts_archive_Oracle.zip /u01/app/oracle


[oracle@testnode1 ~]$ cd /u01/app/oracle
[oracle@testnode1 oracle]$ unzip dba_scripts_archive_Oracle.zip
The final step is to verify (or set) the appropriate environment variable for the current UNIX shell to ensure the Oracle SQL scripts can be run from within SQL*Plus while in any directory. For UNIX, verify the
following environment variable is set and included in your login shell script:

ORACLE_PATH=$ORACLE_BASE/dba_scripts/sql:.:$ORACLE_HOME/rdbms/admin
export ORACLE_PATH

The ORACLE_PATH environment variable should already be set in the .bash_profile


login script that was created in the section Create Login Script for the oracle User Account.

Now that the DBA Scripts Archive for Oracle has been unzipped and the UNIX environment variable ($ORACLE_PATH) has been set to the appropriate directory, you should now be able to run any of the SQL
scripts in the $ORACLE_BASE/dba_scripts/sql while logged into SQL*Plus from any directory. For example, to query tablespace information while logged into the Oracle database as a DBA user:

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

SQL> @dba_tablespaces
Status
-------ONLINE
ONLINE
ONLINE
ONLINE
ONLINE
ONLINE

Tablespace Name
-----------------EXAMPLE
SYSAUX
SYSTEM
TEMP
UNDOTBS1
USERS

TS Type
-----------PERMANENT
PERMANENT
PERMANENT
TEMPORARY
UNDO
PERMANENT

avg
sum

Ext. Mgt.
---------LOCAL
LOCAL
LOCAL
LOCAL
LOCAL
LOCAL

Seg. Mgt.
Tablespace Size
Used (in bytes) Pct. Used
--------- ------------------ ------------------ --------AUTO
157,286,400
85,131,264
54
AUTO
629,145,600
487,718,912
78
MANUAL
734,003,200
705,953,792
96
MANUAL
67,108,864
66,060,288
98
MANUAL
560,988,160
419,102,720
75
AUTO
5,242,880
1,048,576
20
------------------ ------------------ --------70
2,153,775,104
1,765,015,552

6 rows selected.
To obtain a list of all available Oracle DBA scripts while logged into SQL*Plus, run the help.sql script.

SQL> @help.sql
========================================
Automatic Shared Memory Management
========================================
asmm_components.sql
========================================
Automatic Storage Management
========================================
asm_alias.sql
asm_clients.sql
asm_diskgroups.sql
asm_disks.sql
asm_disks_perf.sql
asm_drop_files.sql
asm_files.sql
asm_files2.sql
asm_templates.sql
< --- SNIP --- >
perf_top_sql_by_buffer_gets.sql
perf_top_sql_by_disk_reads.sql
========================================
Workspace Manager
========================================
wm_create_workspace.sql
wm_disable_versioning.sql
wm_enable_versioning.sql
wm_freeze_workspace.sql
wm_get_workspace.sql
wm_goto_workspace.sql
wm_merge_workspace.sql

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

wm_refresh_workspace.sql
wm_remove_workspace.sql
wm_unfreeze_workspace.sql
wm_workspaces.sql

Configure Automatic Database Starting and Stopping


Starting with Oracle Database 11g Release 2, the dbstart and dbshut scripts that were used to automate database startup and shutdown in previous Oracle versions are deprecated. Oracle now
recommends to configure Oracle Database with the Oracle Restart feature to automatically restart the database, the listener, Oracle Automatic Storage Management (Oracle ASM), and other Oracle
components after a hardware or software failure or when the database host computer restarts.
This guide presented instructions for creating an Oracle Restart enabled database and does not require any modifications to automate the database startup and shutdown process.
Modifying the /etc/oratab file and setting the restart flag (the last field) to "Y" is no longer required to automatically startup and shutdown the database when using Oracle Restart. For example, the restart
flag for testdb1 can remain at "N" and Oracle Restart will still automate the database startup and shutdown procedures.

...
+ASM:/u01/app/oracle/product/11.2.0/grid:N
testdb1:/u01/app/oracle/product/11.2.0/dbhome_1:N
...

Managing Oracle Restart Components


This section contains a set of commands that can be used to manage the Oracle Restart configuration. Use the CRSCTL command out of the Oracle Home directory for Oracle Grid Infrastructure
Check the current status of Oracle Restart.

[oracle@testnode1 ~]$ crsctl config has


CRS-4622: Oracle High Availability Services autostart is enabled.
Stop Oracle Restart.

[oracle@testnode1 ~]$ crsctl stop has


CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'testnode1'
CRS-2673: Attempting to stop 'ora.testdb1.db' on 'testnode1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'testnode1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'testnode1' succeeded
CRS-2677: Stop of 'ora.testdb1.db' on 'testnode1' succeeded
CRS-2673: Attempting to stop 'ora.FRA.dg' on 'testnode1'
CRS-2673: Attempting to stop 'ora.TESTDB1_DATA.dg' on 'testnode1'
CRS-2677: Stop of 'ora.TESTDB1_DATA.dg' on 'testnode1' succeeded
CRS-2677: Stop of 'ora.FRA.dg' on 'testnode1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'testnode1'
CRS-2677: Stop of 'ora.asm' on 'testnode1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'testnode1'
CRS-2677: Stop of 'ora.cssd' on 'testnode1' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'testnode1'
CRS-2677: Stop of 'ora.diskmon' on 'testnode1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'testnode1' has completed
CRS-4133: Oracle High Availability Services has been stopped.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Start Oracle Restart.

[oracle@testnode1 ~]$ crsctl start has


CRS-4123: Oracle High Availability Services has been started.
Disable Oracle Restart.

[oracle@testnode1 ~]$ crsctl disable has


CRS-4621: Oracle High Availability Services autostart is disabled.

Miscellaneous Options
This final section contains several miscellaneous options that may be of use to newcomers of Oracle 11g.
Enterprise Manager - Database Console
During the database creation section, we asked for DBCA to create the Enterprise Manager Database Console application. The DBCA will automatically start the OEM Database Console application. To check
for the process, use emctl from $ORACLE_HOME/bin.

[oracle@testnode1 ~]$ emctl status dbconsole


Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://testnode1.idevelopment.info:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
-----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/testnode1.idevelopment.info_testdb1/sysman/log
If you receive something similar to the above output, then OEM Database Console is running. If you need to manually start this application, login as oracle and type the following from $ORACLE_HOME/bin.

[oracle@testnode1 ~]$ emctl start dbconsole


Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://testnode1.idevelopment.info:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ......... started.
-----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/testnode1.idevelopment.info_testdb1/sysman/log
The OEM DB Console application may take several minutes to start.
Once the DB Console application is up and running, point your web browser to https://<Database_Server>:1158/em as in the following:

https://testnode1.idevelopment.info:1158/em
Login:
User Name: SYSTEM
Password: <The password you chose during installation>

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Connect As: Normal

At the time of this writing, I have been unable to determine if it is possible to configure OEM
Database Control in Oracle Restart to be started and stopped when the database server is
cycled. Oracle Restart appears to be a feature in Enterprise Manager Cloud Control 12c and
will be something I research in a future article.

Changing Your Oracle Database Environment


Oracle Grid Infrastructure for a Standalone Server and the Oracle Database software are installed in two separate Oracle home environments as described in the Oracle Configuration section to this guide. When
performing database administration tasks on the machine, it may be necessary to switch between these two Oracle home environments from a terminal session. This requires modifying environment variables
like ORACLE_HOME, ORACLE_SID, PATH, LD_LIBRARY_PATH, etc. Although this can be done manually at the command line, it can get old real quick. Instead you can use a single command line script to
switch between all database environments declared in your /etc/oratab file.

[oracle@testnode1 ~]$ cat /etc/oratab | grep -v '^[#]' | grep -v '^$'


+ASM:/u01/app/oracle/product/11.2.0/grid:N
testdb1:/u01/app/oracle/product/11.2.0/dbhome_1:Y
# line added by Agent
On Linux, the default location for the scripts used to switch your Oracle environment are located in /usr/local/bin.
For example, to switch to the Grid Infrastructure environment, open a terminal window as the oracle user and set the environment to use the Oracle Home for Oracle Grid Infrastructure with . oraenv and enter
the ORACLE_SID +ASM when prompted.

[oracle@testnode1 ~]$ . oraenv


ORACLE_SID = [testdb1] ? +ASM
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle
To switch back to the Oracle Database home environment, enter the name of the Oracle SID for the example database.

[oracle@testnode1 ~]$ . oraenv


ORACLE_SID = [+ASM] ? testdb1
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
Notice that in the above example, we didn't just run the oraenv script, but rather, we sourced it by using a dot followed by a space and then the script name oraenv. When sourcing the oraenv script, it will
prompt you for the ORACLE_SID, (defined in your /etc/oratab file), you want to switch to. In the above example, if an entry exists for +ASM and testdb1, then all Oracle related environment variables would
be set to access the Oracle home environment associated with that entry.
Manage Oracle ASM Disk Groups
Use the asmcmd command-line utility to manage Oracle ASM disk group files and directories.
Open a new terminal session as the oracle user account and set the ORACLE_SID and ORACLE_HOME environment variables to the Oracle Grid Infrastructure for a Standalone Server environment.
For example, use ASMCMD to list the disk groups for the Oracle ASM instance.

[oracle@testnode1 ~]$ ORACLE_SID=+ASM


[oracle@testnode1 ~]$ export ORACLE_SID

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

[oracle@testnode1 ~]$ ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid


[oracle@testnode1 ~]$ export ORACLE_HOME
[oracle@testnode1 ~]$ asmcmd lsdg
Use asmcmd lsdg [group] to list all diskgroups and their information. If [group] is specified, then return only information on that group. The command also informs the user if a rebalance is currently under
way for a diskgroup. This command queries V$ASM_DISKGROUP_STAT by default, which can be modified by the --discovery flag and V$ASM_DISKGROUP will be used instead.

Troubleshooting
This section contains a short list of common errors (and solutions) that can be encountered during the Oracle installation described in this article.
Default Listener Creation Failure in Grid Infrastructure Home
When installing Oracle Grid Infrastructure for a Standalone Server, it is required to either unset the $TNS_ADMIN environment variable or set it appropriately for the Grid Infrastructure environment
($GRID_HOME/network/admin) before starting the Oracle Universal Installer (OUI).
For example, if $TNS_ADMIN is set for the Oracle Database home environment ($ORACLE_HOME/network/admin), the Oracle Net Services Configuration (NETCA) will silently fail with the following error when
run as part of the Grid Infrastructure root.sh script.

Oracle Net Services Configuration:


Configuring Listener:LISTENER
ListenerException: Could not save listener: TNS-04415: File i/o error
caused by: java.io.FileNotFoundException:
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora (No such file or directory)
Listener configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/u01/app/oracle/product/11.2.0/grid/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
ProfileException: Could not save Profile: TNS-04415: File i/o error
caused by: java.io.FileNotFoundException:
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora (No such file or directory)
Profile configuration complete.
Oracle Net Services configuration successful. The exit code is 0
When NETCA fails, no output of the error is written to the terminal session when running the Grid Infrastructure root.sh scrip. The root.sh script configures and starts the Oracle Net Listener and Oracle
ASM components but only registers the Oracle ASM component in the Oracle Restart configuration. The default listener does get created and run in Grid home; however, it does not get associated with the
Oracle ASM component.

[oracle@testnode1 ~]$ srvctl config asm


ASM home: /u01/app/oracle/product/11.2.0/grid
ASM listener was not found
PRCA-1032 : ASM listener LISTENER does not exist
Spfile: +TESTDB1_DATA/asm/asmparameterfile/registry.253.772632389
ASM diskgroup discovery string:
[oracle@testnode1 ~]$ pgrep -lf lsnr
8579 /u01/app/oracle/product/11.2.0/grid/bin/tnslsnr LISTENER -inherit

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

If this error goes unnoticed and does not get corrected, you will receive an error using DBCA when selecting to enable Oracle Enterprise Manager.
Oracle Restart enabled database creation requires Default listener configured and running in Grid Infrastructure home. Use NETCA in Grid Infrastructure home - "/u01/app/oracle/product/11.2.0/grid" to configure
a listener before proceeding.

The Oracle Net Listener created by the Grid Infrastructure installer (through root.sh) will need to be dropped and recreated using NETCA.
From the Grid Infrastructure home environment, stop the currently running Oracle Net Listener and either unset $TNS_ADMIN or set it appropriately for the Grid Infrastructure home environment
(/u01/app/oracle/product/11.2.0/grid/network/admin) as described in the login script for the Oracle user account.

[oracle@testnode1 ~]$ . oraenv


ORACLE_SID = [testdb1] ? +ASM
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle
[oracle@testnode1 ~]$ lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 14-JAN-2012 16:55:23
Copyright (c) 1991, 2009, Oracle.

All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
The command completed successfully
[oracle@testnode1 ~]$ TNS_ADMIN=/u01/app/oracle/product/11.2.0/grid/network/admin
[oracle@testnode1 ~]$ export TNS_ADMIN
Start NETCA and run through the process of creating a default Oracle Net Listener named LISTENER running on the default port 1521.

[oracle@testnode1 ~]$ netca &


Screen Name

Response

Welcome

Select Listener configuration.

Listener Action

Select what you want to do: Add

Oracle Net
Listener Name

Listener name: LISTENER

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

Screen Shot

pdfcrowd.com

Select Protocols

Selected protocols: TCP

TCP/IP Protocol

Select Use the standard port number of 1521

More Listeners?

Would you like to configure another listener? No

Listener
Configuration Done

Listener configuration complete! C lick [Next] to continue. You will be returned to the Welcome screen.

Welcome

Select Naming Methods configuration.

Select Naming
Methods

Selected Naming Methods: Local Naming

Naming Methods
Configuration Done

Naming Methods configuration complete! C lick [Next] to continue. You will be returned to the Welcome screen.

Welcome

C lick [Finish] to exit the NETC A.

Can't locate CompEMdbconsole.pm when running emctl


Make certain that the PATH is configured to find emctl from $ORACLE_HOME/bin and not from $GRID_HOME/bin. Running $GRID_HOME/bin/emctl will result in the following error.

[oracle@testnode1 ~]$ emctl status dbconsole


Can't locate CompEMdbconsole.pm in @INC (@INC contains: %s_javapOracleHome%/sysman/admin/scripts
%s_javapOracleHome%/bin /u01/app/oracle/product/11.2.0/grid/perl/lib/5.10.0/i686-linux-thread-multi
/u01/app/oracle/product/11.2.0/grid/perl/lib/5.10.0 /u01/app/oracle/product/11.2.0/grid/perl/lib
/u01/app/oracle/product/11.2.0/grid/perl/lib/site_perl/5.10.0/i686-linux-thread-multi
/u01/app/oracle/product/11.2.0/grid/perl/lib/site_perl/5.10.0
/u01/app/oracle/product/11.2.0/grid/perl/lib/site_perl
/u01/app/oracle/product/11.2.0/grid/perl/libwww-perl/lib
/u01/app/oracle/product/11.2.0/grid/perl/ext/POSIX
/u01/app/oracle/product/11.2.0/grid/perl/URI
/u01/app/oracle/product/11.2.0/grid/perl/HTML_Parser
/u01/app/oracle/product/11.2.0/grid/perl/HTML-Parser/lib
/u01/app/oracle/product/11.2.0/grid/sysman/admin/scripts
/u01/app/oracle/product/11.2.0/grid/bin
/u01/app/oracle/product/11.2.0/grid/sysman/admin/scripts/Net-DNS-0.48/lib/
/u01/app/oracle/product/11.2.0/grid/sysman/admin/scripts/libnet-1.19/ .)
at /u01/app/oracle/product/11.2.0/grid/bin/EmctlCommon.pm line 597.
[oracle@testnode1 ~]$ which emctl
/u01/app/oracle/product/11.2.0/grid/bin/emctl
[oracle@testnode1 ~]$ . oraenv
ORACLE_SID = [+ASM] ? testdb1
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@testnode1 ~]$ which emctl
/u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl
[oracle@testnode1 ~]$ emctl status dbconsole
Are you a developer? Try out the HTML to PDF API

open in browser PRO version

pdfcrowd.com

[oracle@testnode1 ~]$ emctl status dbconsole


Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://testnode1.idevelopment.info:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
-----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/testnode1.idevelopment.info_testdb1/sysman/log

About the Author


Jeffrey Hunter is an Oracle Certified Professional, Java Development Certified Professional, Author, and an Oracle ACE. Jeff currently works as a Senior Database Administrator for The DBA Zone, Inc. located in
Pittsburgh, Pennsylvania. His work includes advanced performance tuning, Java and PL/SQL programming, developing high availability solutions, capacity planning, database security, and physical / logical
database design in a UNIX / Linux server environment. Jeff's other interests include mathematical encryption theory, tutoring advanced mathematics, programming language processors (compilers and
interpreters) in Java and C, LDAP, writing web-based database administration tools, and of course Linux. He has been a Sr. Database Administrator and Software Engineer for over 20 years and maintains his
own website site at: http://www.iDevelopment.info. Jeff graduated from Stanislaus State University in Turlock, California, with a Bachelor's degree in Computer Science and Mathematics.

Copyright (c) 1998-2014 Jeffrey M. Hunter. All rights reserved.


All articles, scripts and material located at the Internet address of http://w w w .idevelopment.info is the copyright of Jeffrey M. Hunter and is protected under copyright law s of the United States. This document may not be hosted on any other site
w ithout my express, prior, w ritten permission. Application to host any of the material elsew here can be made by contacting me at jhunter@idevelopment.info.
I have made every effort and taken great care in making sure that the material included on my w eb site is technically accurate, but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property w hich may arise
from relying on it. I w ill in no case be liable for any monetary damages arising from such loss, damage or destruction.

Last modified on
Monday, 14-Jul-2014 18:03:07 EDT
Page Count: 37427

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Вам также может понравиться