You are on page 1of 54

Install Oracle Database 11g R2 on Linux - (RHEL 6

)
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
Download Oracle Database Software
Pre-Installation Tasks
Install Oracle Database
Install Oracle Database Examples
Configure Oracle Networking
Create the Oracle Database
Post Database Creation Tasks - (Optional)
Configure Automatic Database Starting and Stopping
Miscellaneous Options
About the Author

Introduction
This article is a comprehensive guide for installing Oracle Database 11g Release 2 (11.2.0.1) on the Red
Hat Enterprise Linux 6 (RHEL6) operating environment. The example database created in this guide will
use the local file system for all physical database file storage (data files, control files, online redo log files,
fast recovery area).
Supported Platforms

Update! — As of May 2012, Oracle announced support for running Oracle 11.2.0.3 or higher
on Oracle Linux 6 and Red Hat Enterprise Linux 6. See Certification Information for Oracle
Database on Linux x86-64 [ID 1304727.1] on the My Oracle Support (MOS) site for more
information.
The requirements for installing Oracle Database 11g Release 2 on RHEL6 or OL6 64-bit
(x86-64) can be found using MOS Note [ID 1441282.1].
I will provide a completely new guide that documents the full install in a future article.

At the time of this writing (29-Dec-2011), Red Hat Enterprise Linux 6 (RHEL6) and Oracle
Linux 6 (OL6) are not certified or supported for use with any Oracle Database version. While

this guide provides instructions for successfully installing Oracle Database 11g Release 2 on
the RHEL6 operating system, it should be used for experimental, training, or evaluation
purposes only.
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.

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 32-bit
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.

Oracle Documentation
While this guide provides detailed instructions for successfully installing a complete Oracle Database
11g Release 2 system, 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's official documentation site is docs.oracle.com.
Release Notes
New Features Guide
Universal Installer and OPatch User's Guide
Database Installation Guide
Database Quick Installation Guide
Database Quick Installation Guide
Database Administrator's Guide
Database Concepts
Database Examples Installation Guide

11g Release 2 (11.2) for Linux
11g Release 2 (11.2)
11g Release 2 (11.2) for Windows and UNIX
11g Release 2 (11.2) for Linux
11g Release 2 (11.2) for Linux x86
11g Release 2 (11.2) for Linux x86-64
11g Release 2 (11.2)
11g Release 2 (11.2)
11g Release 2 (11.2)

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

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

Default Oracle Net Listener running on the system.

A fully configured general-purpose Oracle 11g database that makes use of the local file system
for physical database file storage (data files, control files, online redo log files, 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
(11.2) 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 CentOS Release 6.2 (x86_64). The server has 4GB of memory and contains four (4) internal hard
disks that will be configured using Logical Volume Manager (LVM). Four LVM Volume Groups will be
created along with separate logical volumes used to store the Linux operating system, swap, Oracle
Database Software, database files, and the fast recovery area.
Oracle Server Configuration

Machine Name

IP Address

e1.idevelopment.info

ard Drive

ev/sda

192.168.1.106

Processor

Operation Environment

1 x AMD Athlon™ 64 X2 Dual Core Processor 3800+

M

CentOS Release 6.2 - (64-bit)

Physical Disks
Partition

Size - (MB)

/dev/sda1

500

/dev/sda2

36,363

Type

Usage

ext4

Boot Volume

Physical Volume (LVM)

LVM

Mount Point
/boot
vg_testnode1

Physical Disks

ard Drive

Partition

Size - (MB)

Type

Usage

Mount Point

ev/sdb

/dev/sdb1

36,863

Physical Volume (LVM)

LVM

vg_orasoftware

ev/sdc

/dev/sdc1

36,863

Physical Volume (LVM)

LVM

vg_oradata

ev/sdd

/dev/sdd1

36,863

Physical Volume (LVM)

LVM

vg_orafra

Logical Volumes

VM Volume Group

Logical Volume

Size - (MB)

lv_root

_testnode1

Type

30,248

lv_swap

6,112

Usage

ext4

Linux OS

swap

Swap

Mount Po
/

_orasoftware

lv_orasoftware

36,860

ext4

Oracle Database Software

/u01

_oradata

lv_oradata

36,860

ext4

Database Files

/u02

_orafra

lv_orafra

36,860

ext4

Fast Recovery Area

/u03

Oracle Configuration
The following is an introduction to some of the configuration parameters and directory paths that will be
used for installing the Oracle Database Software and creating a fully functional Oracle 11g database.
Oracle Software Owner
O/S User

501)

Primary Group
oinstall (501)

Supplementary Groups

Home Directory

/home/oracle

dba (502), oper (503)

Oracle Software Components
Software Component

Database

Database

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

Oracle Database Names
Software Component

Oracle SID
testdb1

Global Database Name
testdb1.idevelopment.info

Oracle Software and Database Storage Paths
Description

Directory

Base directory

/u01/app/oracle

Home directory for Oracle Database

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

Data directory

/u02/app/oracle/oradata

es for db_name1 database

/u02/app/oracle/oradata/db_name1

e for Recovery files

/u03/app/oracle/fast_recovery_area

ry files for db_name1 database

/u03/app/oracle/fast_recovery_area/db_name1

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 CentOS 6, Oracle Linux 6, or Red Hat Enterprise Linux 6 and follows Oracle's
suggestion of performing a "Basic Server" installation type to ensure all expected Linux OS packages are
present for a successful Oracle Database installation.

Although this article is written to work with Red Hat Enterprise Linux 6 (RHEL6) or Oracle
Linux 6 (OL6), I will actually be using a Red Hat Linux clone named CentOS. To read more
about CentOS, please visit their website at www.centos.org.
Note that CentOS is not certified or supported for use with any Oracle Database version.
Installing the Oracle database on CentOS should be used for experimental, training, or
evaluation purposes only. 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.

Although I have used Red Hat Fedora in the past, I wanted to switch to a Linux environment that would
guarantee all of the functionality contained with Oracle. This is where CentOS comes in. The CentOS
project takes the Red Hat Enterprise Linux source RPMs and compiles them into a free clone of the Red
Hat Enterprise Server product. This provides a free and stable version of the Red Hat Enterprise Linux
(AS/ES) operating environment that I can use for Oracle testing and development. I have moved away
from Fedora as I need a stable environment that is not only free, but as close to the actual Oracle
supported operating system as possible. While CentOS is not the only project performing the same
functionality, I tend to stick with it as it is stable and reacts fast with regards to updates by Red Hat.
Download CentOS
Use the links below to download CentOS 6.2 for either x86 or x86_64 depending on your hardware
architecture.

click [Next] to continue.2 GB) 32-bit (x86) Installations  CentOS-6.2-x86_64-bin-DVD1. If there were any errors.    InfraRecorder UltraISO Magic ISO Maker Install CentOS After downloading and burning the CentOS images (ISO files) to a DVD. If you are not familiar with this process and do not have the required software to burn images to DVD.2-x86_64-bin-DVD2. Media Test When asked to test the CD media. You may already be familiar with and have the proper software to burn images to DVD.0 GB) Burn Binary Image to DVD If you are downloading the above ISO files to a MS Windows machine. insert CentOS Disk #1 into the server. tab over to [Skip] and hit [Enter].2-i386-bin-DVD2.iso (1. CentOS Basic Installation Screen Name Response Boot Screen The first screen is the CentOS 6.64-bit (x86_64) Installations  CentOS-6.iso (1. power it on.iso (3.iso (4. Select the option Install or upgrade an existing system.2 boot screen. and answer the installation screen prompts as noted below. the installer should then detect the video card. and mouse.6 GB)  CentOS-6. The installer then goes into GUI mode. monitor.2-i386-bin-DVD1.1 GB)  CentOS-6. here are just three of the many software packages that can be used. Welcome to CentOS At the welcome screen. Language Selection Select the appropriate language for your configuration and click [Next] to continue. the media burning software would have warned us. there are many options for burning these images (ISO files) to a DVD. After several seconds. Screen Shot .

then click the [Configure Network] button. The settings you make here will. of course. depend on your network configuration. then click the [Next] button. click the [Add] button and enter the appropriate network details. Select Connection The installer should have successfully detected the installed network device(s) and listed them as connections. click on the "IPv4 Settings" tab. Highlight the relevant connection and click the [Edit] button. Select the appropriate storage option for your configuration and click [Next] to continue.CentOS Basic Installation Screen Name Response Keyboard Selection Select the appropriate keyboard for your configuration and click [Next] to continue. It is not recommended to use DHCP for an Oracle Database server so this guide will use the traditional method of manually assigning a static IP address. set the method to "Manual". Storage Device Warning The installer will display a warning dialog which indicates that the storage device may contain important data or that the device may need to be reinitialized. Storage Options This example will use local internal disks for the OS installation and therefore only requires the "Basic Storage Devices" option. Select the option todiscard any data or to re-initialize the device. Host Name Enter a fully qualified host name for this computer. Manually Configure IP Address Check the "Connect automatically" check-box. Screen Shot . Time Zone Select the appropriate time zone for your environment and click [Next] to continue. click the [Apply] and [Close] buttons to return to the host name screen. After verifying the network configuration. To manually configure an IP address.

Click here for a preview of the disk configuration used for this guide. Modify any volumes as required. of course. The installer will present a default partitioning scheme for the current disk sizes. 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. then the [Format] and [Write changes to disk] buttons on the following warning dialogs. depend on your storage configuration. Ensure enough swap space is allocated as required by Oracle (which is a multiple of the available RAM). Partition Type Select the appropriate partition type for your configuration. In this guide. click [Next] to continue. Click [Next] to continue. The settings you make here will. check the "Review and modify partitioning layout" option.CentOS Basic Installation Screen Name Response Set Root Password Select a root password and click [Next] to continue. Screen Shot . select which device (or devices) to include as system drives. After selecting which devices will be system drives. Select System Drive(s) — (optional) If the machine is configured with multiple storage devices. only one of the devices will be used for the system drive.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. indicate which of them will have the bootloader installed. In order to modify the default partitioning layout. The following is Oracle's minimum requirement for swap space: Disk Partitioning Available RAM Swap Space Required Between 1 GB and 2 GB 1.

however. Choose the following package groups to prepare the machine for an Oracle database install as well as setting up a typical gnome desktop. There are. CentOS installs most of the software required for a typical server.CentOS Basic Installation Screen Name Response Boot Loader In almost all cases. Accept the boot loader settings by clicking the [Next] button to continue. Installation Type Choose the "Basic Server" installation. several other packages (RPMs) that are required to successfully install the Oracle database software. Note that alternative installations may require more packages to be loaded in addition to the ones listed below. Applications > Emacs * Applications > Internet Browser * Base System > Base Base System > Client management tools Base System > Compatibility libraries Base System > Console internet tools * Base System > Console internet tools > ftp * Base System > Hardware monitoring utilities Base System > Large Systems Performance Base System > Network file system client Base System > Performance Tools Base System > Perl Support Base System > iSCSI Storage Client * Desktops > Desktop Screen Shot . Package Group Selection By default. the installer will choose the correct boot loader options. By choosing the "Customize now" option in the previous screen. check the "Customize now" option. the installer brings up the "Package Group Selection" screen which allows you to select the required package groups and individual packages within the details section (Optional packages). and then click [Next] to continue.

the installer will eject the DVD from the drive. Create User Create any additional (non-oracle) operating system user accounts if desired and click [Forward] to continue. Post Installation Wizard Welcome Screen When the system boots into CentOS Linux for the first time. Installation Process The CentOS install process will start immediately. Take out the DVD and click [Reboot] to reboot the system and complete the installation. click [Forward] to continue. Reboot System After all of the packages and bootloader have been installed. Date and Time Adjust the date and time settings if necessary and click [Forward] to Screen Shot . License Agreement Accept the license agreement and click [Forward] to continue. Wait for the installation to complete.CentOS Basic Installation Screen Name Response Desktops > Desktop Platform Desktops > Fonts Desktops > General Purpose Desktop Desktops > Graphical Administration Tools Desktops > Input Methods Desktops > X Window System Development > Additional Development Development > Development Tools Servers > Server Platform Servers > System administration tools * — Optional package After selecting the appropriate package groups. 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. click [Yes] to acknowledge the warning dialog. click [Next] to continue. On the "Welcome screen". If you chose not to define any additional operating system user accounts.

" to log in as root. 2. Open the "Firewall Configuration" dialog (System > Administration > Firewall). Kdump Accept the default setting on the Kdump screen and click [Forward] to continue. Login Screen After the machine boots. Disable Firewall Use the following steps to disable the firewall.. you are presented with the login screen.CentOS Basic Installation Screen Name Response Screen Shot continue. Log in to the system by clicking on a user in the login screen or choose "Other. followed by the [Apply] button on the toolbar. On the resulting dialog. click the [Disable] button. Click [Yes] on the warning dialog to reboot the system. .. 3. Reboot System Enabling Kdump requires the machine to be rebooted in order to reallocate memory accordingly. you are ready to start using the desktop. User Desktop After successfully logging in to the system. GUI 1. Click the [Close] button on the startup dialog and type in the "root" password if requested.

Figure 1: Disable Firewall 4. Disable SELinux Disable SELinux by editing the "/etc/selinux/config" file. Command Line As root. . 5. [root@testnode1 ~]# service iptables save iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ] [root@testnode1 ~]# service iptables stop iptables: Setting chains to policy ACCEPT: filter iptables: Flushing firewall rules: iptables: Unloading modules: OK OK OK ] ] ] [ [ [ [root@testnode1 ~]# chkconfig iptables off [root@testnode1 ~]# service iptables status iptables: Firewall is not running. use the following to disable the firewall for IPv4. Quit the "Firewall Configuration" dialog. Click the [Yes] button on the confirmation dialog. making sure the SELINUX flag is set as follows.

12-1 (32 bit) glibc-common-2. Oracle Linux 6.10 (32-bit) compat-libstdc++-33-3. Install Required Linux Packages for Oracle After installing the Linux OS.0.3 compat-libstdc++-33-3. the RPM command will simply ignore the install and print a warning message to the console that the package is already installed. the next step is to verify and install all packages required for Oracle Database 11g Release 2.12 glibc-devel-2.SELINUX=disabled Once the change is complete. an easier method is to run the rpm -Uvh PackageName command from the DVD. For packages that already exist and are up to date.3 (32 bit) elfutils-libelf-0. 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.51. SELinux can be disabled using the GUI utility (Applications > System Settings > Security Level).148 elfutils-libelf-devel-0.148 gcc-4.20. 64-bit (x86_64) Installations binutils-2.4 glibc-2. The packages listed in this section (or later versions) are required for Oracle database 11g Release 2 running on the Red Hat Enterprise Linux 6. the server will need to be rebooted for the change to take effect. or CentOS 6 platform. If SELinux is disabled after installation.12-1 glibc-2.4 gcc-c++-4.2.4.12 glibc-devel-2. [root@testnode1 ~]# reboot Alternatively. The Oracle Universal Installer (OUI) performs checks on the machine during installation to verify that it meets the appropriate operating system package requirements. While it is possible to query each individual package to determine which ones are missing and need to be installed. To ensure that these checks complete successfully. Click on the SELinux tab and disable the feature.2.12 .10 compat-libcap1-1.4. restart the server.12 (32 bit) glibc-headers-2.2 compat-libcap1-1.

2. Although many of these packages are unnecessary for 11.4 libgcc-4.14 Each of the packages listed above can be found on the CentOS 6 for x86_64 DVDs.107 (32 bit) libgcc-4. Only the 64-bit packages are required. Starting with Oracle Database 11g Release 2 (11.2.4.3.2.ksh-20100621 libaio-0.2).4. all the 32-bit packages.0.3 sysstat-9.4.0.4.107 (32 bit) libaio-devel-0. having them present will not cause a problem. listed in this section are no longer required for installing a database on Linux x86-64. however.107 libaio-0.3.81 numactl-devel-2.2 onwards on Linux x86-64.0.4 (32 bit) make-3. The installation described in this guide will install the 32-bit packages.0.14 (32 bit) unixODBC-devel-2. For any Oracle Database 11g release before 11.4 (32 bit) libstdc++-4.[DVD #1] mkdir -p /media/dvd mount -r /dev/dvd /media/dvd cd /media/dvd/Packages rpm -Uvh binutils-2*x86_64* rpm -Uvh compat-libcap1*x86_64* rpm -Uvh compat-libcap1*i686* rpm -Uvh compat-libstdc++-33*x86_64* rpm -Uvh compat-libstdc++-33*i686* rpm -Uvh elfutils-libelf-0*x86_64* rpm -Uvh elfutils-libelf-devel-0*x86_64* rpm -Uvh gcc-4*x86_64* rpm -Uvh gcc-c++-4*x86_64* rpm -Uvh glibc-2*x86_64* nss-softokn-freebl-3*x86_64* rpm -Uvh glibc-2*i686* nss-softokn-freebl-3*i686* rpm -Uvh glibc-common-2*x86_64* rpm -Uvh glibc-devel-2*x86_64* rpm -Uvh glibc-devel-2*i686* rpm -Uvh glibc-headers-2*x86_64* rpm -Uvh ksh-*x86_64* rpm -Uvh libaio-0*x86_64* .2.4 libstdc++-devel-4.2.107 libaio-devel-0. both the 32-bit and 64-bit packages listed in this section are required. # From CentOS 6.2.0.14 unixODBC-2.4.3.3 (SUSE Linux Enterprise Server 11).3.2 (x86_64) .4 libstdc++-4.4.2.4 (32 bit) libstdc++-devel-4.4 unixODBC-2. except forgcc-32bit-4.

2.2.10 compat-libstdc++-33-3.4.4 libstdc++-4.12 glibc-headers-2.12 kernel-headers-2.4 glibc-2.12-1 glibc-common-2.107 libgcc-4.148 elfutils-libelf-devel-0.4.4.148 elfutils-libelf-devel-static-0.3 sysstat-9.2.51.4.3 elfutils-libelf-0.0.4.14 unixODBC-devel-2.0.6.148 gcc-4.4 unixODBC-2.14 Each of the packages listed above can be found on the CentOS 6 for x86 DVDs.20.4 libgomp-4.107 libaio-devel-0.3.2 compat-libcap1-1.3.2 (x86) .4 libstdc++-devel-4.4 make-3. # From CentOS 6.rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh cd / eject libaio-0*i686* libaio-devel-0*x86_64* libaio-devel-0*i686* libgcc-4*x86_64* libgcc-4*i686* libstdc++-4*x86_64* libstdc++-4*i686* libstdc++-devel-4*x86_64* libstdc++-devel-4*i686* make-3*x86_64* numactl-devel-2*x86_64* sysstat-9*x86_64* unixODBC-2*x86_64* unixODBC-2*i686* unixODBC-devel-2*x86_64* 32-bit (x86) Installations binutils-2.0.81 numactl-devel-2.4 gcc-c++-4.[DVD #1] mkdir -p /media/dvd mount -r /dev/dvd /media/dvd cd /media/dvd/Packages rpm -Uvh binutils-2*i686* .4.12 glibc-devel-2.32 ksh-20100621 libaio-0.

rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh rpm -Uvh cd / eject compat-libcap1*i686* compat-libstdc++-33*i686* elfutils-libelf-0*i686* elfutils-libelf-devel-0*i686* gcc-4*i686* gcc-c++-4*i686* glibc-2*i686* nss-softokn-freebl-3*i686* glibc-common-2*i686* glibc-devel-2*i686* glibc-headers-2*i686* kernel-headers-2*i686* ksh-*i686* libaio-0*i686* libaio-devel-0*i686* libgcc-4*i686* libgomp-4*i686* libstdc++-4*i686* libstdc++-devel-4*i686* make-3*i686* numactl-devel-2*i686* sysstat-9*i686* unixODBC-2*i686* unixODBC-devel-2*i686* # From CentOS 6. 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.[DVD #2] mount -r /dev/dvd /media/dvd cd /media/dvd/Packages rpm -Uvh elfutils-libelf-devel-static-0*i686* 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 Database 11g Release 2 software. Description OS Group Name OS Grou p ID OS Users Assigned to this Group Oracle Inventory and Software Owner oinst all 501 oracle dba 502 oracle.2 (x86) . jhunter Database Administrator Oracle Privile ge Oracle Group Name SYSDB A OSDBA . The following OS groups will be created.

The SYSOPERsystem privilege allows access to a database instance even when the database is not open. Ensure that this group is available as a primary group for all planned Oracle software installation owners. The database being created in this guide will not make use of Automatic Storage Management (ASM) and therefore will not create or assign the ASM related OS groups . jhunter) needing access to an Oracle instance as SYSDBA using operating system authentication. For the purpose of this guide. and the path of the Oracle Central Inventory directory.  Database Operator (OSOPER.loc file. oinstall). Control of this privilege is totally outside of the database itself. The DBA role does not include the SYSDBA or SYSOPER system privileges. jhunter SYSOP ER OSOPER OS Group Descriptions  Oracle Inventory Group (typically oinstall) This group must be created the first time you install Oracle software on the system.Description Database Operator OS Group Name OS Grou p ID OS Users Assigned to this Group Oracle Privile ge Oracle Group Name oper 503 oracle. The default name for this group is oper. typically oper) Members of the OSOPER group can use SQL to connect to an Oracle instance as SYSOPER using operating system authentication. The default name for this group is dba. Members of this group can perform critical database administration tasks. The SYSDBA system privilege should not be confused with the database role DBA. 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.  Database Administrator (OSDBA. Control of this privilege is totally outside of the database itself. This file identifies the name of the Oracle Inventory group (by default. choose the Advanced installation type to install the Oracle database software. the oracle installation owner will be configured with oinstall as its primary group. typically dba) Members of the OSDBA group can use SQL to connect to an Oracle instance as SYSDBA using operating system authentication. 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). OUI creates the /etc/oraInst. TheSYSDBA system privilege allows access to a database instance even when the database is not open. such as creating the database and instance startup and shutdown.e. Members of this optional group have a limited set of database administrative privileges such as managing and running backups. When you install Oracle software on a Linux system for the first time. To use this group.

[root@testnode1 ~]# passwd oracle Changing password for user oracle. [root@testnode1 ~]# su . Create Groups and User for Oracle Database Software Create the recommended OS groups and user for the Oracle Database software owner. and asmoper.502(dba). Optionally.oracle # # # # --------------------------------------------------. Remember to use the append option (-a) to the usermod command so that the user will not be removed from groups not listed. [root@testnode1 [root@testnode1 [root@testnode1 [root@testnode1 ~]# ~]# ~]# ~]# groupadd -g 501 oinstall groupadd -g 502 dba groupadd -g 503 oper useradd -m -u 501 -g oinstall -G dba. configure any other OS users with the appropriate DBA related OS groups to manage the Oracle database.likeasmadmin.503(oper) Create Login Script for the oracle User Account Log in to machine as the oracle user account and create the following login script (.503(oper) Create a new password for the oracle account.bash_profile --------------------------------------------------OS User: oracle .bash_profile).oper -d /home/oracle -s /bin/bash [root@testnode1 ~]# id oracle uid=501(oracle) gid=501(oinstall) groups=501(oinstall). [root@testnode1 ~]# usermod -a -G dba.502(dba). Values marked in red should be customized for your environment.oper jhunter [root@testnode1 ~]# id jhunter uid=500(jhunter) gid=500(jhunter) groups=500(jhunter). New password: xxxxxxxxxxx Retype new password: xxxxxxxxxxx passwd: all authentication tokens updated successfully. asmdba.

and ORACLE_HOSTNAME to use # Enterprise Manager. # --------------------------------------------------ORACLE_UNQNAME=testdb1. # --------------------------------------------------JAVA_HOME=/usr/local/java.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. you were # required to set environment variables for # ORACLE_HOME and ORACLE_SID to start. racdb2. Set ORACLE_UNQNAME equal to # the database unique name and ORACLE_HOSTNAME to # the hostname of the machine.idevelopment. export ORACLE_SID # --------------------------------------------------# ORACLE_UNQNAME and ORACLE_HOSTNAME # --------------------------------------------------# In previous releases of Oracle Database.. then . export ORACLE_BASE # --------------------------------------------------- . racdb1.e. export ORACLE_HOSTNAME # --------------------------------------------------# JAVA_HOME # --------------------------------------------------# Specifies the directory of the Java SDK and Runtime # Environment. stop.bashrc ].info. and # check the status of Enterprise Manager.. you # need to set the environment variables ORACLE_HOME.2) and later.) # --------------------------------------------------ORACLE_SID=testdb1. # --------------------------------------------------ORACLE_BASE=/u01/app/oracle. ~/. # ORACLE_UNQNAME.# Application: Oracle Database Software Owner # Version: Oracle 11g Release 2 # --------------------------------------------------# Get the aliases and functions if [ -f ~/. # (i. With # Oracle Database 11g Release 2 (11.. export JAVA_HOME # --------------------------------------------------# ORACLE_BASE # --------------------------------------------------# Specifies the base of the Oracle directory structure # for Optimal Flexible Architecture (OFA) compliant # database software installations. export ORACLE_UNQNAME ORACLE_HOSTNAME=testnode1.

. The default value of # this parameter is determined by NLS_TERRITORY. export SQLPATH # --------------------------------------------------# ORACLE_TERM # --------------------------------------------------# Defines a terminal definition. --------------------------------------------------SQLPATH=/u01/app/oracle/dba_scripts/sql.0/dbhome_1. The # value of this parameter can be any valid date # format mask. export ORACLE_HOME # --------------------------------------------------# ORACLE_PATH # --------------------------------------------------# Specifies the search path for files used by Oracle # applications such as SQL*Plus. Forms and Menu. Used by all character mode products. # --------------------------------------------------ORACLE_HOME=$ORACLE_BASE/product/11. export ORACLE_PATH # # # # # # # --------------------------------------------------SQLPATH --------------------------------------------------Specifies the directory or list of directories that SQL*Plus searches for a login.2.ora. the Oracle application # uses ORACLE_PATH to locate the file. If the full path to # the file is not specified.# ORACLE_HOME # --------------------------------------------------# Specifies the directory containing the Oracle # Database software. # This variable is used by SQL*Plus. If not set. export NLS_DATE_FORMAT # # # # # --------------------------------------------------TNS_ADMIN --------------------------------------------------Specifies the directory containing the Oracle Net Services configuration files like listener.sql file. and the value must be surrounded by # double quotation marks. export ORACLE_TERM # --------------------------------------------------# NLS_DATE_FORMAT # --------------------------------------------------# Specifies the default date format to use with the # TO_CHAR and TO_DATE functions. it # defaults to the value of your TERM environment # variable. # --------------------------------------------------ORACLE_PATH=/u01/app/oracle/dba_scripts/sql:$ORACLE_HOME/rdbms/admin. or if the file is not # in the current directory. # --------------------------------------------------ORACLE_TERM=xterm. For example: # # NLS_DATE_FORMAT = "MM/DD/YYYY" # # --------------------------------------------------NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS".

character set. # --------------------------------------------------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. export TNS_ADMIN # --------------------------------------------------# ORA_NLS11 # --------------------------------------------------# Specifies the directory where the language.:${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 # --------------------------------------------------# Specifies the list of directories that the shared # library loader searches to locate shared object # libraries at runtime. # must include the $ORACLE_HOME/bin directory. 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=. and sqlnet. # territory. # --------------------------------------------------TNS_ADMIN=$ORACLE_HOME/network/admin.:$ORACLE_HOME/jdbc/lib/ojdbc6.# tnsnames. export ORA_NLS11 # --------------------------------------------------# PATH # --------------------------------------------------# Used by the shell to locate executable programs. and linguistic definition # files are stored. # --------------------------------------------------PATH=.jar CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib export CLASSPATH . "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. # --------------------------------------------------ORA_NLS11=$ORACLE_HOME/nls/data.ora.ora. The class search path (more commonly known # by the shorter name.

To determine if the user exists. then enter the following command to create it. set the THREADS_FLAG environment variable to # "native". if set. [root@testnode1 ~]# /usr/sbin/useradd nobody . enter the following command. If this command displays information about the nobody user. complete the following procedure to verify that the user nobody exists on the system. export THREADS_FLAG # --------------------------------------------------# TEMP. TMP.# --------------------------------------------------# THREADS_FLAG # --------------------------------------------------# All the tools in the JDK use green threads as a # default. [root@testnode1 ~]# id nobody uid=99(nobody) gid=99(nobody) groups=99(nobody) 2. # --------------------------------------------------THREADS_FLAG=native. 3. and TMPDIR # --------------------------------------------------# Specify the default directories for temporary # files. # --------------------------------------------------umask 022 Verify That the User nobody Exists Before installing the software. then you do not have to create that user. You can revert to the use of green # threads by setting THREADS_FLAG to the value # "green". tools that create temporary files # create them in one of these directories. If the user nobody does not exist. 1. # --------------------------------------------------export TEMP=/tmp export TMPDIR=/tmp # --------------------------------------------------# UMASK # --------------------------------------------------# Set the default file mode creation mask # (umask) to 022 to ensure that the user performing # the Oracle software installation creates files # with 644 permissions. To specify that native threads should be # used.

[root@testnode1 ~]# mkdir -p /u03/app/oracle/fast_recovery_area [root@testnode1 ~]# chown -R oracle:oinstall /u03/app [root@testnode1 ~]# chmod -R 775 /u03/app At the end of this section. whose members include oracle. [root@testnode1 ~]# mkdir -p /u01/app/oracle [root@testnode1 ~]# chown -R oracle:oinstall /u01/app [root@testnode1 ~]# chmod -R 775 /u01/app Create the Data Files Directory Path Create the directory that will be used to store the Oracle data files. whose members include oracle. data files. whose members include oracle.  OFA-compliant mount points /u01. and directory path configuration. and who are granted the SYSDBA privilege to administer the Oracle Database.  A separate OSDBA group (dba). Members of this group have the central inventory group as their primary group and are granted permissions to write to the oraInventory directory.  An Oracle Database software owner (oracle). The Oracle base path will be used to store the Oracle Database software.  A separate OSOPER group (oper).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. and recovery files.  An Oracle central inventory group. with the oraInventory group as its primary group. and who are granted limited Oracle database administrator privileges. and /u03 that will be used for the Oracle software installation. . /u02. groups. and with the OSDBA (dba) and OSOPER (oper) group as its secondary group. [root@testnode1 ~]# mkdir -p /u02/app/oracle/oradata [root@testnode1 ~]# chown -R oracle:oinstall /u02/app [root@testnode1 ~]# chmod -R 775 /u02/app Create the Fast Recovery Area Directory Path Create the directory that will be used to store the Oracle recovery files. you should have the following user. or oraInventory group (oinstall).

OUI creates the Oracle Inventory directory in the path /u01/app/oraInventory. Resource Shell Limit Item in limits. For example: [oracle@testnode1 ~]$ ulimit -Sn 1024 [oracle@testnode1 ~]$ ulimit -Hn 1024 3. This path remains owned by oracle:oinstall.  OFA-compliant recovery files directory /u03/app/oracle/fast_recovery_area owned by oracle:oinstall with 775 permissions. For example: . Ensure that the result is in the recommended range. During installation. Log in as an Oracle installation owner. Check the soft and hard limits for the file descriptor setting. to enable other Oracle software owners to write to the central inventory. Ensure that the result is in the recommended range. Set Resource Limits for the Oracle Software Installation Users To improve the performance of the software on Linux systems.  OFA-compliant data directory /u02/app/oracle/oradata owned by oracle:oinstall with 775 permissions. 2.c onf 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 stack at least 10240 KB at least 10240 KB. 1. Check the soft and hard limits for the number of processes available to a user. you must increase the following resource limits for the Oracle software owner (oracle).  An Oracle base /u01/app/oracle owned by oracle:oinstall with 775 permissions. and at most 32768 KB Size of the stack segment of the process Use the following to check resource limits.

Ensure that the result is in the recommended range. session required pam_limits.login file. For the Bourne. oracle oracle oracle oracle oracle soft hard soft hard soft nproc nproc nofile nofile stack 2047 16384 1024 65536 10240 Add the following line to the /etc/pam. add the following lines to the /etc/profile file. Bash. if [ $USER = "oracle" ]. . then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi For the C shell (csh or tcsh).d/login file. add the following lines to the /etc/csh.so Depending on your shell environment.conf configuration file for the Oracle installation owner by adding the following lines. update the resource limits in the /etc/security/limits.[oracle@testnode1 ~]$ ulimit -Su 1024 [oracle@testnode1 ~]$ ulimit -Hu 31296 4. then if [ $SHELL = "/bin/ksh" ]. if it does not already exist. or Korn shell. make the following changes to the default shell startup file in order to change ulimit settings for the Oracle installation owner. Check the soft limit for the stack setting. For example: [oracle@testnode1 ~]$ ulimit -Ss 10240 [oracle@testnode1 ~]$ ulimit -Hs unlimited 5. If necessary.

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 Database 11g Release 2 installation.rmem_max = 4194304 net.shmmni = 4096 kernel. For production database systems.rmem_default = 262144 net. setting the IP local port range.shmmax kernel.core. so if your system uses a larger value. The kernel parameters discussed in this section will need to persist through machine reboots. Although there are several methods used to set these parameters.shmmax = 4294967295 kernel. Instructions for setting all OS kernel parameters required by Oracle in a startup script will be discussed later in this section.wmem_default = 262144 net.shmall = 2097152 kernel.ipv4. Verify that the kernel parameters described in this section are set to values greater than or equal to the recommended values. setting shared memory and semaphores.aio-max-nr = 1048576 RHEL/OL/CentOS 6 already comes configured with default values defined for the following kernel parameters.conf file. Oracle recommends that you tune these values to optimize the performance of the system.wmem_max = 1048576 fs. kernel. This includes verifying enough memory and swap space.ip_local_port_range = 9000 65500 net. do not change it. kernel. Oracle Database 11g Release 2 for Linux requires the kernel parameter settings shown below.core. The values given are minimums. Kernel Parameters The kernel parameters presented in this section are only recommended values as documented by Oracle. setting the maximum number of file handles. Also note that when setting the four semaphore values that all four values need to be entered on one line.core. I will be making all changes permanent through reboots by placing all values in the /etc/sysctl.core.shmall .sem = 250 32000 100 128 net.file-max = 6815744 fs. and how to activate all kernel parameters for the system.

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.wmem_default = 262144 .rmem_max = 4194304 # Default setting in bytes of the socket "send" buffer which # may be set by using the SO_SNDBUF socket option net.The default values for these two kernel parameters should be overwritten with the recommended values defined in this guide.shmall = 2097152 # Maximum number of shared memory segments system wide kernel. Add or amend the following lines in the /etc/sysctl.ip_local_port_range = 9000 65500 # Default setting in bytes of the socket "receive" buffer which # may be set by using the SO_RCVBUF socket option net.conf file. # +---------------------------------------------------------+ # | KERNEL PARAMETERS FOR ORACLE DATABASE 11g R2 ON LINUX | # +---------------------------------------------------------+ # +---------------------------------------------------------+ # | SHARED MEMORY | # +---------------------------------------------------------+ # Maximum size (in bytes) for a shared memory segment 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.shmmni = 4096 # +---------------------------------------------------------+ # | SEMAPHORES | # +---------------------------------------------------------+ # SEMMSL_value SEMMNS_value SEMOPM_value kernel.core.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.ipv4.

wmem_max = 1048576 fs.shmmni = ~]# /sbin/sysctl -a | grep shm | sort 2097152 4294967295 4096 .conf.bridge-nf-call-ip6tables = 0 net. To activate the new kernel parameter values for the currently running system. run the following as root. Linux allows modification of these kernel parameters to the current system while it is up and running.rmem_default = 262144 net.sem = 250 32000 100 128 net.tcp_syncookies = 1 net.shmmni = 4096 kernel.core.aio-max-nr = 1048576 Placing the kernel parameters in the /etc/sysctl.ip_forward = 0 net.bridge.default.ip_local_port_range = 9000 65500 net.ipv4.core.# Maximum setting in bytes of the socket "send" buffer which # may be set by using the SO_SNDBUF socket option net. so there's no need to reboot the system after making kernel parameter changes.core.ipv4.wmem_default = 262144 net.bridge.ipv4.default.conf.shmmax = kernel.bridge-nf-call-arptables = 0 kernel.ipv4.aio-max-nr = 1048576 Verify the new kernel parameter values by running the following.file-max = 6815744 # Maximum number of allowable concurrent asynchronous I/O requests requests fs.msgmnb = 65536 kernel.msgmax = 65536 kernel.bridge-nf-call-iptables = 0 net.ipv4.rmem_max = 4194304 net.core_uses_pid = 1 net.core.core.shmall = 2097152 kernel.conf startup file persists the required kernel parameters through reboots. [root@testnode1 ~]# sysctl -p net.bridge.sysrq = 0 kernel.rp_filter = 1 net.shmall = kernel.wmem_max = 1048576 # +---------------------------------------------------------+ # | FILE HANDLES | # ----------------------------------------------------------+ # Maximum number of file-handles that the Linux kernel will allocate fs.shmmax = 4294967295 kernel.file-max = 6815744 fs.accept_source_route = 0 kernel. [root@testnode1 kernel.

Available RAM Swap Space Required Between 1 GB and 2 GB 1.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).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.vm.[rw]mem' | sort net.core. Use the following command to check the amount of installed RAM on the system. then you must install more memory before continuing.aio-max-nr = 1048576 fs.rmem_default = 262144 net.ipv4.wmem_max = 1048576 [root@testnode1 ~]# /sbin/sysctl -a | egrep 'file-max|aio-max' | sort fs.core.core.ip_local_port_range = 9000 65500 [root@testnode1 ~]# /sbin/sysctl -a | grep 'core\.core. [root@testnode1 ~]# cat /proc/meminfo | grep MemTotal MemTotal: 4020892 kB If the size of the installed RAM is less than the required size. [root@testnode1 ~]# grep SwapTotal /proc/meminfo SwapTotal: 6258680 kB .hugetlb_shm_group = 0 [root@testnode1 ~]# /sbin/sysctl -a | grep sem kernel.rmem_max = 4194304 net.wmem_default = 262144 net.sem = 250 32000 100 128 [root@testnode1 ~]# /sbin/sysctl -a | grep ip_local_port_range net. Swap Space The following table describes the relationship between installed RAM and the configured swap space recommendation.

1. As root. Next. If necessary. enter the following command. To determine the amount of shared memory available. rebuild your system. the HugePages feature allocates non-swappable memory for large page tables using memory-mapped files. then you should deduct the memory allocated to HugePages from the available RAM before calculating swap space. the Automatic Memory Management feature requires more shared memory (/dev/shm) and file descriptors. make a file that will act as additional swap space. 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. [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. change the file permissions. If you enable HugePages.On Linux. additional swap space can be configured by creating a temporary swap file and adding it to the current swap. let's say about 500MB. This way you do not have to use a raw device or even more drastic. Finally. [root@testnode1 ~]# chmod 600 tempswap 3. [root@testnode1 ~]# dd if=/dev/zero of=tempswap bs=1k count=500000 2. enter the following command. [root@testnode1 ~]# df -h /dev/shm/ Filesystem Size Used Avail Use% Mounted on . 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.

0G 288K 2.1. .idevelopment. <IP-address> <fully-qualified-machine-name> <machine-name> For example. 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.info testnode1 Check and turn off UDP ICMP rejections During the Linux OS install.106 localhost localhost. 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.localdomain4 Confirm Fully Qualified Name for the Server in /etc/hosts The /etc/hosts file must contain a fully qualified name for the server.localdomain localhost4 localhost4. 127.0.168. I indicated to disable the firewall. you need a static IP address.localdomain4 it will need to be removed as shown below: 127.0.localdomain localhost4 localhost4.0.0. This sections contains additional network configuration steps that will prepare the machine to run the Oracle database.0. we already configured the IP address and host name for the database node.0G 1% /dev/shm MEMORY_MAX_TARGET and MEMORY_TARGET cannot be used when LOCK_SGA is enabled or with HugePages on Linux.localdomain4 testnode1.localdomain localhost4 localhost4.1 192.0. Note that the Oracle database server should have a static IP address configured for the public network (eth0 for this guide). If the machine name is listed in the in the loopback address entry as below: 127.1 testnode1 localhost localhost. Network Configuration During the Linux OS install.tmpfs 2.1 localhost localhost. Do not use DHCP naming for the public IP address.

2. Oracle offers a development and testing license free of charge.0. you will need to first manually disable UDP ICMP rejections. or My Oracle Support (MOS) website depending on your support status. [root@testnode1 ~]# /etc/rc.1)  MOS: Oracle Database 11g Release 2 (11.1. [root@testnode1 ~]# chkconfig iptables off Download Oracle Database Software Download and extract the required Oracle software packages from the Oracle Technology Network (OTN). is provided and the license does not permit production use.2.2. however. This is a free account. Oracle Database 11g Release 2 (11.0.d/iptables status iptables: Firewall is not running.3) are only available through My Oracle Support (MOS) and are listed as patch sets in this section.0.2. 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.0.0) for Linux x86  OTN: Oracle Database 11g Release 2 (11. Then. No support.2. MOS requires a paid software license and support contract and is the only place to download critical updates and patch sets.d/init. A full description of the license agreement is available on OTN.0.2) and (11.0) for Linux x86-64  eDelivery: Oracle Database 11g Release 2 (11.2. turn UDP ICMP rejections off for all subsequent server reboots (which should always be turned off).d/init.0. If you do not currently have an account with Oracle OTN or eDelivery. Oracle Software Delivery Cloud (eDelivery).0.d/iptables stop Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: filter [ OK ] Unloading iptables modules: [ OK ] 3. If the firewall option is operating.2.3) Oracle Database 11g Release 2 base release (11. Starting with the release of the .2. Oracle Database  OTN: Oracle Database 11g Release 2 (11.0. 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).2 or 11. you will need to create one.1) is available through the Oracle Software Delivery Cloud (eDelivery) or OTN.1.1.2. [root@testnode1 ~]# /etc/rc.

11. Log in as the Oracle software owner (oracle) and download the Oracle Database and Oracle Examples (optional) software to an install directory.0.2.2.x64_11gR2_database_1of2.zip [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 ~]$ ~]$ ~]$ ~]$ ~]$ mkdir -p /home/oracle/software/oracle mv p10098816_112020_Linux-x86-64_1of7.zip oracle]$ unzip linux.x64_11gR2_examples.0.zip oracle]$ unzip linux.x64_11gR2_database_2of2.0.x64_11gR2_database_1of 2. For example /home/oracle/software/oracle.0.2.zip /home/oracle/software/orac cd /home/oracle/software/oracle .zip /home/oracle/software/orac mv p10098816_112020_Linux-x86-64_6of7.2 Patch Set Oracle Software Component Relea se MOS Patch Set Associated Zip File(s) Oracle Database 11g Release 2 11.2.zip Oracle Database 11g Release 2 Examples 11. 2 10098816 p10098816_112020_Linux-x8664_1of7.0.zip Oracle Release 11. 1 OTN / eDelivery / MOS linux.1 Oracle Software Component Relea se Location Associated Zip File(s) Oracle Database 11g Release 2 11.2.2.zip linux.x64_11gR2_database_1of2.0.zip /home/oracle/software/orac mv p10098816_112020_Linux-x86-64_2of7.x64_11gR2_examples.2.zip /home/oracle/software/oracle ~]$ mv linux.zip Oracle Database 11g Release 2 Examples 11.  Oracle Database 11g Release 2 for Linux  Oracle Database 11g Release 2 Examples (optional) Oracle Release 11.0.x64_11gR2_examples.zip /home/oracle/software/oracle ~]$ cd /home/oracle/software/oracle oracle]$ unzip linux.zip p10098816_112020_Linux-x8664_2of7.x64_11gR2_database_2of2. 1 OTN / eDelivery / MOS linux. Oracle Database patch sets are full installations of the Oracle Database software (you do not need to download and install 11.x64_11gR2_database_2of 2.2 patch set for Oracle Database 11g Release 2.0.1 first).zip /home/oracle/software/oracle ~]$ mv linux.2. 2 10098816 p10098816_112020_Linux-x8664_6of7.zip [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 ~]$ mkdir -p /home/oracle/software/oracle ~]$ mv linux.

zip [oracle@testnode1 oracle]$ unzip p10098816_112020_Linux-x86-64_6of7. DISPLAY=<machine-name>:0.0.502(dba). 3 10404530 p10404530_112030_Linux-x8664_6of7. we will forgo the "Create Database" option when installing the Oracle Database software.zip Oracle Database 11g Release 2 Examples 11.zip You should now have a single directory called database and the optional examples directory containing the Oracle installation files.2. export DISPLAY Start the Oracle Universal Installer (OUI) by issuing the following command in the database install directory.zip /home/oracle/software/orac ~]$ cd /home/oracle/software/oracle oracle]$ unzip p10404530_112030_Linux-x86-64_1of7.zip /home/oracle/software/orac ~]$ mv p10404530_112030_Linux-x86-64_2of7.2. The database will be created later in this guide using the Database Configuration Assistant (DBCA) after all installs have been completed.zip [oracle@testnode1 oracle]$ unzip p10098816_112020_Linux-x86-64_2of7. [oracle@testnode1 ~]$ id uid=501(oracle) gid=501(oinstall) groups=501(oinstall).zip [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 [oracle@testnode1 ~]$ mkdir -p /home/oracle/software/oracle ~]$ mv p10404530_112030_Linux-x86-64_1of7.zip /home/oracle/software/orac ~]$ mv p10404530_112030_Linux-x86-64_6of7. 3 10404530 p10404530_112030_Linux-x8664_1of7.3 Patch Set Oracle Software Component Relea se MOS Patch Set Associated Zip File(s) Oracle Database 11g Release 2 11.0.zip Oracle Release 11. Log into the node as the Oracle software owner (oracle). Install Oracle Database For the purpose of this example.[oracle@testnode1 oracle]$ unzip p10098816_112020_Linux-x86-64_1of7.zip oracle]$ unzip p10404530_112030_Linux-x86-64_2of7.0.zip p10404530_112030_Linux-x8664_2of7. If you are using X emulation then set the DISPLAY environmental variable accordingly.zip oracle]$ unzip p10404530_112030_Linux-x86-64_6of7.503(oper) .0.2.

2.  11./runInstaller At any time during installation.0.2: The installer should only show a single "missing package" failure for the "pdksh" package. RHEL6 and OL6 are not certified or supported for use with any Oracle Database version at the time of this writing. Enter your My Oracle Support password in the "My Oracle Support Password" field.2.[oracle@testnode1 ~]$ cd /home/oracle/software/oracle/database [oracle@testnode1 database]$ . preferably your My Oracle Support e-mail address or user name in the Email field. Install ation Option Select "Install database software only". un-check the security updates checkbox and click the [Next] button to continue. Screen Name Response Config ure Securi ty Updat es To stay informed with the latest security issues. Acknowledge the warning dialog indicating you have not provided an email address by clicking the [Yes] button. You can select the "I wish to receive security updates via My Oracle Support" check box to receive security updates. As mentioned at the beginning of this guide.0.3: The installer shows no failures and continues normally. enter your e-mail address.1: The installer shows multiple "missing package" failures because it does not recognize several of the newer version packages that were installed. The prerequisites checks will fail for the following version-dependent reasons. The failure for the "pdksh" package can be ignored because it is no longer part of RHEL6 and we installed the "ksh" package in its place. The failure for the "pdksh" package can be ignored because it is no longer part of RHEL6 and we installed the "ksh" package in its place.  11. click the Help button on the OUI page. if you have a question about what you are being asked to do. Datab ase Edition Select "Enterprise Edition". Install Specify the Oracle base and Software location (Oracle home) as Scree n Shot .2. These "missing package" failures can be ignored as the packages are present. Produc t Langu ages Make the appropriate selection(s) for your environment. For the purpose of this example.0. Grid Option s Select "Single instance database installation".  11.

0/dbhome_1/root. [root@testnode1 ~]# Scree n Shot .sh Within the same console window stay logged in as the root user account and execute the root. for example). Summ ary Click [Finish] to start the installation. Execut e Config uratio n scripts After the installation completes. Oracle Base: /u01/app/oracle Software Location: /u01/app/oracle/product/11. Database Administrator (OSDBA) Group: dba Database Operator (OSOPER) Group: oper Prereq uisite Checks 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. you will need to create the Oracle Inventory. if necessary.sh script. 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 (the "pdksh-5. If all prerequisite checks pass.Screen Name Response ation Locati on follows.2. and completes other operating system configuration tasks. then you can easily fix the issue by generating the fixup script by clicking the [Fix & Check Again] button. If the OUI detected any failed checks.-14" missing package.2.2. Install Produc t The installer performs the Oracle Database software installation. Open a new console window as the root user account and execute theorainstRoot. If OUI detects an incomplete task that is marked "fixable". When you run the script.sh scripts. if any checks fail. [root@testnode1 ~]# /u01/app/oraInventory/orainstRoot. Inventory Directory: /u01/app/oraInventory oraInventory Group Name: oinstall Operat ing Syste m Group s Select the OS groups to be used for the SYSDBA and SYSOPER privileges. you will be prompted to run the /u01/app/oraInventory/orainstRoot.sh and /u01/app /oracle/product/11. The fixup script is generated during installation.0/dbhome_1 Create Invent ory Since this is the first install on the host. it raises kernel values to required minimums. Starting with 11g Release 2. the OUI continues to the Summary screen. Use the default values provided by the OUI. You will be prompted to run the script as root in a separate terminal session.sh script. the installer (OUI) will create shell script programs called fixup scripts to resolve many incomplete system configuration requirements.

sh [11. The failure for the "pdksh" package can be ignored because it is no longer part of RHEL6 and we installed the "ksh" package in its place.0] [root@testnode1 ~]# /u01/app/oracle/product/11. click the Help button on the OUI page. The failure for the "pdksh" package can be ignored because it is no longer part of RHEL6 and we installed the "ksh" package in its place.3.1.2.0.  11.0.2.3: The installer shows no failures and continues normally. Finish At the end of the installation. These "missing package" failures can be ignored as the packages are present.0/dbhome_1/root.2.2.2. [oracle@testnode1 ~]$ cd /home/oracle/software/oracle/examples [oracle@testnode1 examples]$ .0] [root@testnode1 ~]# /u01/app/oracle/product/11. .  11. RHEL6 and OL6 are not certified or supported for use with any Oracle Database version at the time of this writing.0.1: The installer shows multiple "missing package" failures because it does not recognize several of the newer version packages that were installed.2. click the [Close] button to exit the OUI.2.sh [11./runInstaller At any time during installation.sh [11. As mentioned at the beginning of this guide.0. you have the option to install the Oracle Database 11g Release 2 Examples.  11. Start the Oracle Universal Installer (OUI) by issuing the following command in the examples install directory as the Oracle software owner (oracle).0/dbhome_1/root.2.Screen Name Response Scree n Shot /u01/app/oracle/product/11. The prerequisites checks will fail for the following version-dependent reasons.0. if you have a question about what you are being asked to do. Install Oracle Database Examples Now that the Oracle Database 11g Release 2 software is installed.0/dbhome_1/root.2: The installer should only show a single "missing package" failure for the "pdksh" package.0.2.2.0] Go back to OUI and acknowledge the "Execute Configuration scripts" dialog window.

If the OUI detected any failed checks. Finish At the end of the installation. and completes other operating system configuration tasks. The fixup script is generated during installation.2. the OUI continues to the Summary screen.2. for example). the installer (OUI) will create shell script programs called fixup scripts to resolve many incomplete system configuration requirements. if necessary. then you can easily fix the issue by generating the fixup script by clicking the [Fix & Check Again] button. When you run the script.Screen Name Installation Location Response Screen Shot Specify the Oracle base and Software location (Oracle home) as follows. Configure Oracle Networking The Database Configuration Assistant (DBCA) requires the Oracle TNS Listener process to be configured and running on the machine before it can create the database. As the Oracle software owner (oracle). If OUI detects an incomplete task that is marked "fixable".-14" missing package. Install Product The installer performs the Oracle Database Examples software installation. You will be prompted to run the script as root in a separate terminal session. 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 (the "pdksh-5. Oracle Base: /u01/app/oracle Software Location: /u01/app/oracle/product/11. [oracle@testnode1 ~]$ netca & . Starting with 11g Release 2.0/dbho me_1 Prerequisit e Checks 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. it raises kernel values to required minimums. If all prerequisite checks pass. start the Network Configuration Assistant (NETCA) and run through the process of creating a new TNS listener process and to also configure the node for local access. if any checks fail. click the [Close] button to exit the OUI. Summary Click [Finish] to start the installation.

Welcome Select Naming Methods configuration.Production on 31-DEC-2011 22:32:27 Copyright (c) 1991. Screen Shot The Oracle TNS listener process should now be running.At any time during the network configuration.2. Screen Name Response Welcome Select Listener configuration.0 .0. 2009. You will be returned to the Welcome screen. Select Naming Methods Selected Naming Methods: Local Naming Naming Methods Configuration Done Naming Methods configuration complete! Click [Next] to continue. Oracle. if you have a question about what you are being asked to do. Welcome Click [Finish] to exit the NETCA. You will be returned to the Welcome screen. All rights reserved. click the Help button on the configuration screen. [oracle@testnode1 ~]$ ps -ef | grep lsnr | grep -v 'grep' | awk '{print $9}' LISTENER [oracle@testnode1 ~]$ lsnrctl status LSNRCTL for Linux: Version 11. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=testnode1.1.idevelopment. Listener Action Select what you want to do: Add Oracle Net Listener Name Listener name: LISTENER 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! Click [Next] to continue.info)(PORT= STATUS of the LISTENER .

18 min. You may use any database domain.info SID Prefix: testdb1 Note: I used idevelopment. You should also verify that the Oracle TNS listener service is running before attempting to start the database creation process. you can leave the default Screen Shot .o Listener Log File /u01/app/oracle/diag/tnslsnr/testnode1/listener/alert/log. 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".0/dbhome_1 environment.xml Listening Endpoints Summary. Keep in mind that this domain does not have to be a valid DNS domain. Operations Select Create a Database.2.1.2. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=testnode1. Database Templates Select Custom Database. 3 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11. Database Identification Database naming.info for the database domain.0. Before executing the DBCA...2. make certain that the $ORACLE_HOME and $PATH are set appropriately for the $ORACLE_BASE/product/11.idevelopment.idevelopment. run the following as the Oracle software owner (oracle).0/dbhome_1/network/admin/listener. Management From the "Enterprise Manager" tab.0 . [oracle@testnode1 ~]$ dbca & Screen Name Response Welcome Screen Click [Next] to continue.Production Start Date 31-DEC-2011 22:14:25 Uptime 0 days 0 hr.info)(PORT=1521))) The listener supports no services The command completed successfully Create the Oracle Database Use the Oracle Database Configuration Assistant (DBCA) to create the database. Create the Database To start the database creation process.-----------------------Alias LISTENER Version TNSLSNR for Linux: Version 11. Global Database Name: testdb1.

Click OK on the "Summary" screen. Database Credentials I selected to Use the Same Administrative Password for All Accounts. Enter the password (twice) and make sure the password does not start with a digit number. Flash Recovery Area: /u03/app/oracle/fast_recovery_area Flash Recovery Area Size: Use Oracle-Managed Files My disk group has a size of about 36GB. End of Database Creation At the end of the database creation. This option is available since we installed the Oracle Database 11g Examples. use the entire volume minus 10% for overhead — (36-10%=32 GB). exit from the DBCA. Database File Locations Specify storage type and locations for database files. the database creation will start. I also always select to Generate Database Creation Scripts. Screen Shot When the DBCA has completed. you will have a fully functional Oracle Database 11g Release 2 database running. I used a Fast Recovery Area Size of 32 GB (32768 MB). Database Content I left all of the Database Components (and destination tablespaces) set to their default value although it is perfectly OK to select the Sample Schemas. Test Database Connectivity . Database Storage Change any parameters for your environment.Screen Name Response Options option here which is to Configure Enterprise Manager / Configure Database Control for local management. Click Finish to start the database creation process. I left them all at their default settings for this example. After acknowledging the database creation report and script generation dialog. Initialization Parameters Change any parameters for your environment. Creation Options Keep the default option Create Database selected. Storage Type: File System Storage Locations: Use Oracle-Managed Files Database Area: /u02/app/oracle/oradata Recovery Configuration Check the option for Specify Flash Recovery Area. When defining the Fast Recovery Area size. I left them all at their default settings for this example. Using the "Automatic Maintenance Tasks" tab. Database Creation Process Wait for the database process to complete. leave the default option which is to Enable automatic maintenance tasks.

COUNT(owner) AS "OBJECT_COUNT" FROM dba_objects GROUP BY owner. SYSTIMESTAMP ----------------------------------------02-JAN-12 05. .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.996107 PM -05:00 SQL> SELECT owner.-----------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.59. USER -----------------------------SYSTEM SQL> SELECT systimestamp FROM dual. OWNER OBJECT_COUNT -----------------------------.30.

Oracle Enterprise Manager If you configured Oracle Enterprise Manager (Database Control).info:1158/em/ [oracle@testnode1 ~]$ emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 11.0 Copyright (c) 1996.0/dbhome_1/testnode1. https://testnode1. The URL for this example is: https://testnode1.2.1.idevelopment.idevelopment.idevelop . 2009 Oracle Corporation. All rights reserved.2.info:1158/em/console/aboutApplication Oracle Enterprise Manager 11g is running. -----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/11.0. it can be used to view the database configuration and current status of the database.

(Database Console) .Figure 2: Oracle Enterprise Manager .

When the current online redolog fills. The Database Configuration Assistant (DBCA) allows users to configure a new database to be in archive log mode within the Recovery Configuration section. If the database is in "Archive Log Mode". Oracle moves to the next one. This is a process known as archiving. mount the database.sql Enabling Archive Logs Whether a single instance or clustered database. Note however that this will require a short database outage. A thread (an Oracle instance) must contain at least two online redologs (or online redolog groups). it is a simple task to put the database into archive log mode. SQL> startup mount ORACLE instance started. This step is optional but recommended.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. Total System Global Area 1657225216 bytes . Oracle writes to its online redolog files in a circular manner. Database dismounted. Oracle will switch to the next one. [oracle@testnode1 ~]$ sqlplus / as sysdba SQL> @?/rdbms/admin/utlrp. As already mentioned. 2. In cases like this where the database is in no archive log mode. Once an online redolog fills. 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). ORACLE instance shut down. however most DBA's opt to bypass this option during initial database creation. Oracle will make a copy of the online redo log before it gets reused. An Oracle instance will use its group of online redologs in a circular manner. Database closed. 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. After shutting down the instance. Log in to the database as a user with SYSDBA privileges and shut down the instance. 1. Oracle tracks and logs all changes to database blocks in online redolog files. [oracle@testnode1 ~]$ sqlplus / as sysdba SQL> shutdown immediate. To facilitate media recovery.

5.zip archive will be copied to/u01/app/oracle. Although these views provide a simple and easy mechanism to query critical information regarding the database. Database altered. download the dba_scripts_archive_Oracle. The DBA Scripts Archive for Oracle can be downloaded using the following linkhttp://www. 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.idevelopment. unzip the archive file to the $ORACLE_BASE directory. security. SQL> alter database archivelog. the dba_scripts_archive_Oracle. 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 74 76 76 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. For the purpose of this example. For example: . Enable archiving. it helps to have a collection of accurate and readily available SQL scripts to query these views.Fixed Size Variable Size Database Buffers Redo Buffers 1336904 973081016 671088640 11718656 bytes bytes bytes bytes 3. SQL> alter database open. Database altered. Next. 4. and session management. Verify Archive Log Mode is enabled. As the Oracle software owner (oracle).zip archive to the $ORACLE_BASE directory. backups. performance.info/data/Oracle/DBA_scripts/dba_scripts_archive_Oracle.zip. Open the database.

200 70 MANUAL 67.145. run the help.--------AUTO 157.sql 1.76 . to query tablespace information while logged into the Oracle database as a DBA user: 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.600 48 MANUAL 734.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. verify the following environment variable is set and included in your login shell script: ORACLE_PATH=$ORACLE_BASE/dba_scripts/sql:. For UNIX.988. Mgt.864 6 MANUAL 560.003.:$ORACLE_HOME/rdbms/admin export ORACLE_PATH The ORACLE_PATH environment variable should already be set in the .400 8 AUTO 629.153. To obtain a list of all available Oracle DBA scripts while logged into SQL*Plus.880 -----------------.104 6 rows selected.zip /u01/app/oracle [oracle@testnode1 ~]$ cd /u01/app/oracle [oracle@testnode1 oracle]$ unzip dba_scripts_archive_Oracle.bash_profile login script that was created in the section Create Login Script for the oracle User Account.[oracle@testnode1 ~]$ cp Downloads/dba_scripts_archive_Oracle.286.-----------------. SQL> @help.242. 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.sql ======================================== Automatic Shared Memory Management ======================================== asmm_components. Mgt.sql script. 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.--------2. Tablespace Size Used ( --------. For example.775.108.160 41 AUTO 5. ---------LOCAL LOCAL LOCAL LOCAL LOCAL LOCAL Seg.

sql asm_drop_files.sql asm_templates.sql ======================================== Workspace Manager ======================================== wm_create_workspace.sql wm_remove_workspace.sql asm_disks.SNIP --.sql wm_enable_versioning. you can manage the Oracle Restart configuration. a command-line interface. When using Oracle Restart.sql wm_workspaces. can coexist on the same server but without being managed by Oracle Restart.sql wm_merge_workspace.> perf_top_sql_by_buffer_gets.sql asm_clients.2 resources. to manage Oracle processes (database instance. the listener.sql wm_disable_versioning.sql wm_freeze_workspace.sql Configure Automatic Database Starting and Stopping Oracle Restart Starting with Oracle Database 11g Release 2.sql asm_disks_perf.sql < --. and other Oracle components after a hardware or software failure or when the database host computer restarts. Oracle Automatic Storage Management (Oracle ASM).sql asm_files. however.2.sql wm_goto_workspace. see the status of processes managed by Oracle Restart.sql wm_unfreeze_workspace.sql asm_diskgroups.======================================== Automatic Storage Management ======================================== asm_alias.sql asm_files2. ASM instance). Oracle Restart can only manage 11. and start or . listener. Oracle Database releases prior to 11.sql wm_get_workspace. With SRVCTL. Oracle now recommends to configure Oracle Database with the Oracle Restart feature to automatically restart the database.sql wm_refresh_workspace. you can use Service Control Utility (SRVCTL). the dbstart and dbshut scripts that were used to automate database startup and shutdown in previous Oracle versions are deprecated.sql perf_top_sql_by_disk_reads.

the only instance defined in the /etc/oratab file is testdb1: . then you must install Oracle Grid Infrastructure for a Standalone Server before you install and create the database..0/dbhome_1:Y . testdb1:/u01/app/oracle/product/11.0/grid. up to and including RHEL 6. then components like the database and TNS listener get automatically added to the Oracle Restart configuration. SRVCTL has been enhanced to support single instance databases with Oracle Restart on standalone servers and on clusters with Oracle Clusterware. I opted to forgo discussing how to use Oracle Restart to automatically start/stop the Oracle instance in this guide. Next. If Oracle Grid Infrastructure for a Standalone Server is installed first. Edit the /etc/oratab file and set the restart flag (the last field) to "Y" for the instance you want to automatically startup and shutdown.2. Otherwise. Although the Oracle grid infrastructure for a Standalone Server install is fairly straightforward. Oracle Restart is a component of Oracle Grid Infrastructure for a Standalone Server which is a separate install from the Oracle Database software. I provide a separate guide on configuring Oracle Restart on a standalone server. Note that you can install Oracle Grid Infrastructure for a Standalone Server first and the database later or vice-versa. automatic database startup and shutdown using the su command method is still available in Oracle Database 11g Release 2. you must manually register the database with Oracle Restart.. including Oracle Linux..stop processes such as the Oracle Database. create a text file named /etc/init. The method described in this section is referred to as the "su" command method. #!/bin/sh # chkconfig: 345 99 10 .1) instances on Linux. 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. If you want to use Oracle ASM or Oracle Restart. In the case where the database is configured first and Grid later.. Although now deprecated. Using the latest Optimal Flexible Architecture (OFA). This method can be used with any RHEL or RHEL clone distribution. containing the following. Installing Oracle Grid Infrastructure for a Standalone Server is required in order to use Oracle Restart and must be installed in a separate home (known as Grid home) from the database Oracle home. Also note that Oracle Restart is used in single-instance (non-clustered) environments only.2. Automatic Database Startup/Shutdown using "su" Command This section contains the recommended method defined by Oracle for automating database startup and shutdown of Oracle Database 10g and Oracle Database 11g Release 1 (11.d/dbora as the root user. For the purpose of this example. the components will need to be manually added to the Oracle Restart configuration.

0/dbhome_1 ORA_OWNER=oracle if [ ! -f $ORA_HOME/bin/dbstart ] then echo "Oracle startup: cannot start" exit fi case "$1" in 'start') # Start the Oracle databases: # The following command assumes that the oracle login # will not prompt the user for any values su . Use the chmod command to set the privileges to 750.d/dbora Associate the dbora service with the appropriate run levels and set it to auto-start using the following command. esac Note that the /etc/init. [root@testnode1 ~]# chmod 750 /etc/init. 'stop') # Stop the Oracle databases: # The following command assumes that the oracle login # will not prompt the user for any values su . As of Oracle Database 10g Release 2. ORA_HOME=/u01/app/oracle/product/11.$ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME" .d/dbora script listed above may look a little different from a similar one used for Oracle9i — most notably the omission of the commands to start/stop the Oracle TNS listener process.# # # # # # # description: Oracle auto start-stop script. the dbstartscript includes the commands to automatically start/stop the listener. . [root@testnode1 ~]# chkconfig --level 345 dbora on The relevant instances should now startup/shutdown automatically at system startup/shutdown.$ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME" . Set ORA_OWNER to the user id of the owner of the Oracle database in ORA_HOME... Set ORA_HOME to be equivalent to the $ORACLE_HOME from which you wish to execute dbstart and dbshut.2.

# ORACLE=oracle PATH=${PATH}:$ORACLE_HOME/bin HOST=`hostname` PLATFORM=`uname` export ORACLE_HOME PATH # if [ ! "$2" = "ORA_DB" ] . . #!/bin/sh # chkconfig: 345 99 10 # description: Oracle auto start-stop script.Final Notes The /etc/init.d/dbora script would be defined as follows.. then remsh $HOST -l $ORACLE -n "$0 $1 ORA_DB" exit else rsh $HOST -l $ORACLE $0 $1 ORA_DB exit fi fi # case $1 in 'start') $ORACLE_HOME/bin/dbstart $ORACLE_HOME . When using the rsh method.2. ORACLE_HOME=/u01/app/oracle/product/11.$ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME" Starting with Oracle Database 10g. # # Change the value of ORACLE_HOME to specify the correct Oracle home # directory for your installation.. su .) su .$ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME" (and. Oracle switched from recommending the "su" command to the "rsh" command of which I completely disagree with. 'stop') $ORACLE_HOME/bin/dbshut $ORACLE_HOME . the /etc/init.. then if [ "$PLATFORM" = "HP-UX" ] ..0/dbhome_1 # # Change the value of ORACLE to the login name of the # oracle owner at your site.d/dbora script defined in this section uses the "su -" command to run the Oracle scripts dbstart and dbshut.

2009 Oracle Corporation. Given the RSH server (and other r* packages) do not get installed by default. If you need to manually start this application. then OEM Database Console is running.2.info:1158/em/console/aboutApplication Oracle Enterprise Manager 11g is running. Furthermore. -----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/11. login as the Oracle software owner (oracle) and type the following: . To check for the process. using the rsh method can be problematic when attempting to use it under Fedora Core 5 and Fedora Core 6 where rsh is deprecated.Install the rhs and rsh-server packages from the OS CD/DVD -# rpm -Uvh --force rsh-* # # # # -.1. Miscellaneous Options This final section contains several miscellaneous options that may be of use to newcomers of Oracle 11g. esac # exit Note that this method relies on the presence of an RSH server.Enable rsh and rlogin -chkconfig rsh on chkconfig rlogin on service xinetd reload I completely disagree with the recommendation to use rsh and prefer to stick with using the su command method. All rights reserved. we asked for DBCA to create the Enterprise Manager Database Console application. type the following: [oracle@testnode1 ~]$ emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 11.0 Copyright (c) 1996.0/dbhome_1/testnode1.2. Enterprise Manager . which requires additional packages and configuration.*) echo "usage: $0 {start|stop}" exit ..idevelopment.0. The RSH server does not get installed by default on many Linux distributions (and for good reason!). The DBCA will automatically start the OEM Database Console application. the DBA would need to locate and install them before this method could be used: # -. https://testnode1.idevelop If you receive something similar to the above output.Database Console During the database creation section.

Oracle 9. -----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/11.1.2.2. 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.0 Copyright (c) 1996. and 11. you need an efficient method to modify your environment variables to switch between these two databases.info:1158/em/console/aboutApplication Starting Oracle Enterprise Manager 11g Database Control .[oracle@testnode1 ~]$ emctl start dbconsole Oracle Enterprise Manager 11g Database Control Release 11.... oraenv ORACLE_SID = [ora1020] ? testdb1 The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11. It is even possible to be using two different databases running on different releases of the Oracle Database software. From the command prompt. (i.2. Although this can be done manually at the command line. Whatever the case may be..0. Instead you can use a single command line script to switch between all database environments declared in your /etc/oratab file. you may have two database — ora1020(using Oracle release 10.0/dbhome_1 is /u01/app/oracle . All rights reserved. simply run the following: [oracle@testnode1 ~]$ .2. PATH.2.2.0).. started.1.idevelop The OEM DB Console application may take several minutes to start. For example...0.2. https://testnode1.e. 2009 Oracle Corporation.1..0.idevelopment. etc.0). you may have more than one database running on your single database server. it can get old real quick.0/dbhome_1/testnode1. This requires you update environment variables like ORACLE_HOME. If you have been following along with this article. Changing Your Oracle Database Environment In some cases.info:1158/em Login: User Name: SYSTEM Password: <The password you chose during installation> Connect As: Normal The emctl start dbconsole / emctl stop dbconsole commands can be placed in the/etc/init. LD_LIBRARY_PATH.7. ORACLE_SID.0) and testdb1 (using Oracle release 11. Oracle 8.d/dbora script to be started and stopped when the database server is cycled. the required scripts for switching your Oracle database environment are already included (in /usr/local/bin).idevelopment. 10.

developing high availability solutions. it will prompt you for the ORACLE_SID. Jeff's other interests include mathematical encryption theory. About the Author Jeffrey Hunter is an Oracle Certified Professional. we didn't just run the oraenv script.info. His work includes advanced performance tuning. Author. LDAP. you want to switch to. capacity planning. When sourcing the oraenv script. then all Oracle related environment variables would be set to access this database.Notice that in the above example. database security. Jeff currently works as a Senior Database Administrator for The DBA Zone. Inc. and physical / logical database design in a UNIX / Linux server environment. if an entry exists for testdb1. programming language processors (compilers and interpreters) in Java and C. Jeff graduated from Stanislaus State University in Turlock. tutoring advanced mathematics. Database Administrator and Software Engineer for over 20 years and maintains his own website site at: http://www. (defined in your /etc/oratab file). writing web-based database administration tools. and an Oracle ACE. Java and PL/SQL programming. located in Pittsburgh. Java Development Certified Professional. and of course Linux. we sourced it by using a dot followed by a space and then the script name oraenv. . He has been a Sr. California. but rather. Pennsylvania.iDevelopment. In the above example. with a Bachelor's degree in Computer Science and Mathematics.