How do I Install a Standalone Oracle Database?

Applies to:

RHEL 6.x, OL6.x

Contents

1 Overview
      1.1 Software and Hardware Requirements
         1.1.1 Hardware Requirements
         1.1.2 Network Requirements
         1.1.3 Operating System Requirements
2 Preparing for Oracle Installation
      2.1 Attaching to RHN/ULN Repository
      2.2 Installing the Dell Validated RPM
      2.3 Installing the Dell Oracle Utilities RPM
         2.3.1 Oracle Software Binary Location
      2.4 Setting up the Network
         2.4.1 Public Network
3 Preparing Shared Storage for Oracle Installation
       3.1 Partitioning the Shared Disk
       3.2 Adjusting the StripeElement Size on a Primary Partition
       3.3 Setting up Permissions for ASM disks using udev rules
4 Installing Oracle 11g R2 Grid Infrastructure for standalone server 
5 Installing Oracle 11g R2 Database (RDBMS) Software
6 Creating Database Using DBCA

 

Overview


This document applies to Oracle Database 11g R2 running on Red Hat Enterprise Linux 6.x AS x86_64 or Oracle Enterprise Linux 6.x AS x86_64.

Software and Hardware Requirements


Hardware Requirements

  • Oracle requires 1.5 gigabytes (GB) of physical memory.
  • Swap space must be equal to the amount of RAM allocated to the system.
  • Oracle's temporary space (/tmp) must be at least 1 GB in size.
  • A monitor that supports resolution of 1024 x 768 to correctly display the Oracle Universal Installer (OUI)
  • For Dell supported hardware configurations, see the Software Deliverable List (SDL) for each Dell Validated Component at dell.com/oracle.

The following table describes the disk space required for an Oracle installation:

Table 1-1

Minimum Disk Space Requirements

Software Installation Location

Size Required

Grid Infrastructure home
Oracle Database home

4.5 GB Space
4 GB of Space

Shared storage disk space

Sizes of database and Flashback Recovery Area

[top]

Network Requirements

  • It is recommended that you ensure at least one network interface cards for public network.
  • The hostname must follow the RFC 952 standard (www.ietf.org/rfc/rfc952.txt). Hostnames that include an underscore ("_") are not permitted.

[top]

Operating System Requirements

  • Red Hat Enterprise Linux 6.x AS x86_64
  • Oracle Linux 6.x AS x86_64

[top]

Preparing for Oracle Installation

Attaching to RHN/ULN Repository

NOTE: The documentation provided below discusses how to setup a local yum repository using your operating system installation media. If you would like to connect to the RHN/ULN channels, see the appropriate documentation. For Red Hat see, redhat.com/red_hat_network. For information relating to ULN network see, linux.oracle.com.

This section discusses hosting the repository files from a local filesystem storage. While other options to host repository files exist, they are outside of the scope of this document. It is highly recommended to use local filesystem storage for speed and simplicity of maintenance.

  1. One of the requirements is to have the DVD image mounted either by physical media or by ISO image.
    1. To mount the DVD, insert the DVD into the server and it should auto-mount into the /media directory.
    2. To mount an ISO image we will need to run the following command as root, substituting the path name of your ISO image for the field myISO.iso:
      mkdir /media/myISO
      mount -o loop myISO.iso /media/myISO
  2. To install and configure the http daemon, configure the machine that will host the repository for all other machines to use the DVD image locally. Create the file /etc/yum.repos.d/local.repo and enter the following:

    [local]
    name=Local Repository
    baseurl=file:///media/myISO/Server
    gpgcheck=0
    enabled=0

[top]

 Installing the Dell Validated RPM

Once the Database node is attached to the appropriate yum repository, we will need to install the Dell Validated RPM package. The Dell Validated RPM package automates certain pieces of the installation process required for the installation of Oracle.

The process to install the Dell Validated RPM package is as follows:

  • Download the latest Dell Oracle Deployment tar file from
    http://en.community.dell.com/techcenter/enterprise-solutions/m/oracle_db_gallery/default.aspx

    NOTE: The filename will follow the convention: Dell-Oracle-Deployment-OS-version-year-month.tar, for example: Dell-Oracle-Deployment-Lin-EL6-2012-08.tar
  • Copy the Dell Oracle Deployment tar file to a working directory of all your cluster nodes.

  • To go to your working directory, enter the following command:
    # cd </working/directory/path>

  • Untar the Dell-Oracle-Deployment release using the command:
    # tar zxvf Dell-Oracle-Deployment-o-v-y-m.tar.gz

    NOTE: Where, o is the operating system, v is the operating system version, y is the year, and m is the month of the tar release.

  • Change directory to Dell-Oracle-Deployment-o-v-y-m

  • Install the Dell-Oracle-RDBMS-Server-11gR2-Preinstall RPM package on all your cluster nodes using the following command:
    # yum localinstall dell-oracle-rdbms-server-11gR2-preinstall* --nogpgcheck

                                  

 [top]

Installing the Dell Oracle Utilities RPM

The Dell Oracle utilities RPM is designed to do the following Dell and Oracle recommended settings:

  • Create Grid Infrastructure directories, set ownership, and permissions.
  • Create grid user.
  • Create Oracle Database (RDBMS) directories, set ownership, and permissions.
  • Create the Oracle base directories, set ownership, and permissions.
  • Set pam limits within (/etc/pam.d/login).
  • Setup /etc/profile.
  • Set SELinux to Disabled.
  • Install the Dell PowerEdge system component drivers if applicable.
  • Set kernel parameters.
  • Set nproc for grid user within (/etc/security/limits.conf)

The process to install the Dell Oracle utilities RPM is as follows:

  1. Install the Dell oracle utilities RPM package from the Dell-Oracle-Deployment=0-y-m directory the by typing:
    # yum localinstall dell-oracle-utilities* --nogpgcheck
  2. Once the rpm is installed, run the dodeploy script to setup the environment as follows: # dodeploy -g -r 11gR2

    For more information about the Dell oracle utilities RPM and its options, check the man pages using the command: # man 8 dodeploy

NOTE: The Dell-Oracle-Deplyoment tar contains the latest supported drivers provided from our Software Deliverable List (SDL). Consult the README file found within the Dell-Oracle-Deployment tar for installation instructions of the latest drivers.


[top]

Oracle Software Binary Location

The Oracle software binaries should be located on the database node. It is important to note that starting with Oracle 11g R2 (11.2.0.3), Oracle Database patch sets are full installation of the Oracle software. For more information on how this impacts future Oracle deployments, see My Oracle Support note: 1189783.1 Important Changes to Oracle Database Patch Sets Starting with 11.2.0.2.

[top]

Setting up the Network

Public Network

NOTE: Ensure that the public IP address is a valid and routable IP address.
To configure the public network :

  1. Log in as root.
  2. Edit the network device file /etc/sysconfig/network-scripts/ifcfg-eth#
    where # is the number of the network device:

    NOTE: Ensure that the Gateway address is configured for the public network interface. If the Gateway address is not configured, the Oracle Grid installation may fail.


    DEVICE=eth0
    ONBOOT=yes
    IPADDR=<Public IP Address>
    NETMASK=<Subnet mask>
    BOOTPROTO=static
    HWADDR=<MAC Address>
    SLAVE=no
    GATEWAY=<Gateway Address>
  3. Edit the /etc/sysconfig/network file, and, if necessary, replace localhost.localdomain with the qualified public node name. For example, the command for node :hostname=node.domain.com
  4. Type service network restart to restart the network service.
  5. Type ifconfig to verify that the IP addresses are set correctly.
  6. To check your network configuration, ping the public IP address from a
    client on the LAN.


[top]

Preparing Shared Storage for Oracle Installation

NOTE: In this section, the terms disk(s), volume(s), virtual disk(s), LUN(s) mean the same and are used interchangeably, unless specified otherwise. Similarly, the terms Stripe Element Size and Segment Size both can be used interchangeably.

Oracle Standalone using Oracle ASM requires LUNs for storing Oracle Database files, and Flash Recovery Area (FRA). To ensure high availability it is recommended that you have:

  • At least two shared disks to store your database. Each shared disk should be the same disk speed and size.
  • At least two shared volumes/LUNs or volumes to store your FRA. Ideally, the FRA space should be large enough to copy all of your Oracle datafiles and incremental backups. For more information on optimally sizing your FRA, see My Oracle Support ID 305648.1 section "What should be the size of Flash Recovery Area?"

NOTE: The use of device mapper multipath is recommended for optimal performance and persistent name binding.
NOTE: For more information on attaching shared LUNs/volumes, see the Wiki documentation found at: http://en.community.dell.com/dell-groups/enterprise_solutions/w/oracle_solutions/3-storage.aspx

[top]

Partitioning the Shared Disk

  1. This section describes how to use Linux’s native partition utility fdisk to create  a single partition on a volume/virtual disk that spans the entire disk.

    To use the fdisk utility to create a partition:

    1. At the command prompt, type one of the following:
      • #> fdisk –cu /dev/<block_device>
      • #> fdisk –cu /dev/mapper/<multipath_disk>
      Where, <block_device> is the name of the block device that you are
      creating a partition on. For example, if the block device is /dev/sdb, type: fdisk –cu /dev/sdb

      Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
      Building a new DOS disklabel with disk identifier 0x89058e03.
      Changes will remain in memory only, until you decide to write them.
      After that, of course, the previous content won't be recoverable.
      Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
      The device presents a logical sector size that is smaller than
      the physical sector size. Aligning to a physical sector (or optimal
      I/O) size boundary is recommended, or performance may be impacted.
      1. Command (m for help): n # To create a new partition
      2. Command actione extendedp primary partition (1-4):
        P # To create a primary partition
      3. Partition number (1-4): 1
      4. First sector (4096-xxxxxx, default 4096): 

    2. Repeat step 1 for all the disks.

    3. Type the following to re-read the partition table and to be able to see the newly created partition(s)

      #> partprobe 
      Or 
      #> service multipathd restart 
      Or 
      #> kpartx –a /dev/mapper/<multipath_disk>
       
    4. Reboot the system if your newly created  partition is not
      displayed properly.


    [top]

Setting up Permissions for ASM disks using udev rules

Red Hat Enterprise Linux 6/Oracle Linux 6 have the ability to use udev rules to ensure that the system properly manages permissions of device nodes. In this case, we are referring to properly setting permissions for our LUNs/volumes discovered by the OS. It is important to note that udev rules are executed in enumerated order. When creating udev rules for setting permissions, please include the prefix 20- and append .rules to the end of the filename. An example file name is 20-dell_oracle.rules

In order to set udev rules, one must capture the WWIDs of each disk to be used within your ASM device using the scsi_id command.

The command is as follows:

scsi_id --page=0x83 --whitelisted --device=/dev/sdX

where sdX is the name of your block device.

If one must run this command to capture multiple WWIDs, one could use the following for loop to do just that via the shell:

[root@rhel6 ~]# for i in sdb sdc sdd sde; do \ printf "%s %s\n" "$i" \ "$(scsi_id --page=0x83 --whitelisted --device=/dev/$i)"; done

Output:

sdb 360026b900061855e000008a54ea5356a 
sdc 360026b9000618571000008b54ea5360b 
sdd 360026b900061855e000008a54ea5356a 
sde 360026b9000618571000008b54ea5360b

Once the WWIDs have been captured, create a file within the /etc/udev/rules.d/ directory and name it 20-dell_oracle.rules. A separate KERNEL entry must exist for each storage device and will require adding the WWID to the "RESULT==" field.

An example of what needs to be placed in the /etc/udev/rules.d/20-dell_oracle.rules file

#------------------------ start udev rule contents ------------------#

KERNEL=="dm-*", PROGRAM="scsi_id --page=0x83 --whitelisted --device=/dev/%k",RESULT=="360026b9000618571000008b54ea5360b", OWNER:="grid", GROUP:="asmadmin"

KERNEL=="dm-*", PROGRAM="scsi_id --page=0x83 --whitelisted --device=/dev/%k",RESULT=="360026b900061855e000008a54ea5356a", OWNER:="grid", GROUP:="asmadmin"

#-------------------------- end udev rule contents ------------------#

As you can see from the above, the KERNEL command looks at all dm devices, executes the PROGRAM which captures the WWID, if the RESULT of the WWID is matched, appropriately assign the grid user as the OWNER and the asmadmin group as the GROUP.


Installing Grid Infrastructure for Standalone Server

Before you install the Oracle 11g R2 Grid Infrastructure software for a Standalone Server on your system:

  • Ensure that you have already configured your operating system, network, and storage based on the steps from the previous sections within this document.
  • Locate your Oracle 11g R2 media kit.
  • Log in as root
  •  If you are not in a graphical environment, start the X Window System by typing: startx
  • Open a terminal window and type: xhost +
  • Mount the Oracle Grid Infrastructure media.
  • Log in as grid user, for example: su - grid.
  • Type the following command to start the Oracle Universal Installer:<CD_mountpoint>/runInstaller
  • In the Download Software Updates window, enter your My Oracle Support credentials to download the latest patch updates. If you choose not to download the latest patches, select Skip software updates.

In the Select Installation Option window, select Install and Configure Grid Infrastructure for a Standalone Server and click Next.

In the Create ASM Disk Group window, enter the following information:

  • ASM diskgroup— Enter a name, for example: DATA
  • Redundancy— For your ASM disks, select High if five ASM disks are available, select Normal if three ASM disks are available, or select External if one ASM disk is available (not recommended).

Click on Use Same Passwords for these accounts & Click Next

Leave the Operating System Groups to be default, Ignore the Warning and Click Next

Choose the Oracle Base and Software Location, and Click Next.

The Prerequisite Checks are performed& the summary screen is presented. Click Next on the summary screen.

The Installation proceeds. And the Progress is seen in the setup screen.

After the installation is complete, the Execute Configuration Scripts wizard is displayed. Complete the instructions in the wizard and click Ok.


Now that the Grid Infrastructure is installed, let’s now install the Database. 

Installing Oracle 11g R2 Database (RDBMS) Software

  1. Log in as root and type: xhost +.
  2. Mount the Oracle Database 11gR2 media. 
  3. Log out as root user and log in as Oracle user by typing: 
    su - oracle 
  4. Run the installer script from your Oracle database media:
    <CD_mount>/runInstaller
  5. In the Configure Security Updates window, enter your My Oracle
    Support credentials to receive security updates, else click Next.

  6. In the Download Software Updates window, enter your My Oracle Support credentials to download patch updates available after the initial release. If you choose not to update at this time, select Skip software updates and click Next.

  7. In the Select Installation Option window, select Install database software only.

  8. In the Grid Installation Options window: Select Single Instance database installation and Click Next.


  9. In the Select Product Lanaguages window, select English as the Language Option and click Next.

  10. In the Select Database Edition window, select Enterprise Edition and click Next.

  11. In the Installation Location window,
    • Specify the location of your Oracle Base configured within the Dell oracle utilities RPM.
    • NOTE: The default locations used within the Dell Oracle utilites RPM are as follows:
      • Oracle Base—/u01/app/oracle
      • Software Location—/u01/app/oracle/product/11.2.0/db_1




       
  12. In the Privileged Operating System Groups window, select dba for Database Administrator (OSDBA) Group and oinstall for Database Operator (OSOPER) Group and click Next.

  13. In the Perform Prerequisite Checks window, check the overall status of all the prerequisites.
    • If any prerequisites fail and have the status as Fixable, click the Fix & Check Again button.
    • Execute the runfixup.sh script provided by the Oracle OUI.

      NOTE: If there are other prerequisites that display status Error, repeat step 13, If the Error status still persists after all changes have been fixed, select Ignore All.




  14. In the Summary window, select Install.

  15. On completion of the installation process, the Execute Configuration scripts wizard is displayed. Follow the instructions in the wizard and click Ok.




  16. In the Finish window, click Close.

Creating Database Using DBCA

  1. Login as oracle user.
  2. From $<ORACLE_HOME>, run the DBCA utility by typing:
    $<ORACLE_HOME>/bin/dbca &
  3. In the Welcome window, select Oracle Single Instance Database and click Next.

In the operations window, select Create Database, and Click Next

Select Custom Database Option the Database Templates Screen

In the Database Identification window:

  1. Provide the Global Database Name
  2. Provide the SID

In the Management Options window, select the default values and click Next.



In the Database Credentials window, enter the appropriate credentials for your Database.

In the Database File Location window, select:

  1. Automatic Storage Management (ASM) for Storage Type.
  2. Use Oracle-Managed Files for Storage Location.
  3. Browse to select the ASM disk group that you created to store the database files (DBDG)for Database Area.


In the Select Disk Group sub window, Select the Disk Group

In the Recovery Configuration window,

a)      Specify Fast Recovery Area

b)      Enable Archiving  

Choose these options according to your environment and click Next


In the Database Content Window, Click Next

In the Initialization Parameters window:

  1. Select Custom.
  2. For the Memory Management section, select Automatic Shared Memory Management.
  3. Specify appropriate values for the SGA Size and PGA Size.
  4. Click Next.

In the Database Storage window, click Next

In the Creation Options Window, click Next

In the Summary window, click Ok to create Database.



Click Exit on the Database Configuration Assistant window after the database creation is complete.